Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / System / Windows / Automation / Peers / ListViewAutomationPeer.cs / 1 / ListViewAutomationPeer.cs
using System; using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Security; using System.Text; using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Interop; using System.Windows.Media; using MS.Internal; using MS.Win32; namespace System.Windows.Automation.Peers { /// public class ListViewAutomationPeer : ListBoxAutomationPeer { /// public ListViewAutomationPeer(ListView owner) : base(owner) { Invariant.Assert(owner != null); } /// override protected AutomationControlType GetAutomationControlTypeCore() { if (_viewAutomationPeer != null) { return _viewAutomationPeer.GetAutomationControlType(); } else { return base.GetAutomationControlTypeCore(); } } /// override protected string GetClassNameCore() { return "ListView"; } /// override public object GetPattern(PatternInterface patternInterface) { object ret = null; if (_viewAutomationPeer != null) { ret = _viewAutomationPeer.GetPattern(patternInterface); if (ret != null) { return ret; } } return base.GetPattern(patternInterface); } /// protected override ListGetChildrenCore() { if (_refreshItemPeers) { _refreshItemPeers = false; ItemPeers.Clear(); } List ret = base.GetChildrenCore(); if (_viewAutomationPeer != null) { //If a custom view doesn't want to implement GetChildren details //just return null, we'll use the base.GetChildren as the return value ret = _viewAutomationPeer.GetChildren(ret); } return ret; } /// protected override ItemAutomationPeer CreateItemAutomationPeer(object item) { return _viewAutomationPeer == null ? base.CreateItemAutomationPeer(item) : _viewAutomationPeer.CreateItemAutomationPeer(item); } /// /// /// protected internal IViewAutomationPeer ViewAutomationPeer { // Note: see bug 1555137 for details. // Never inline, as we don't want to unnecessarily link the // automation DLL via the ISelectionProvider interface type initialization. [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] get { return _viewAutomationPeer; } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] set { if (_viewAutomationPeer != value) { _refreshItemPeers = true; } _viewAutomationPeer = value; } } #region Private Fields private bool _refreshItemPeers = false; private IViewAutomationPeer _viewAutomationPeer; #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SharedStatics.cs
- PowerModeChangedEventArgs.cs
- BinaryConverter.cs
- UnsafeNativeMethods.cs
- IndexOutOfRangeException.cs
- XmlSchemaChoice.cs
- SHA512.cs
- Base64Stream.cs
- MenuItem.cs
- BitmapEffectGroup.cs
- NativeCppClassAttribute.cs
- EventLogEntry.cs
- BitmapInitialize.cs
- SoapFormatterSinks.cs
- InputProcessorProfilesLoader.cs
- HtmlLink.cs
- CounterSampleCalculator.cs
- QilInvokeEarlyBound.cs
- IisTraceListener.cs
- FileNotFoundException.cs
- ProviderMetadata.cs
- ProxyElement.cs
- EncryptedData.cs
- BinaryWriter.cs
- DrawingImage.cs
- DataGridViewColumnCollection.cs
- RouteParametersHelper.cs
- XmlTypeAttribute.cs
- Token.cs
- OutputCacheEntry.cs
- SmtpFailedRecipientException.cs
- BindableTemplateBuilder.cs
- TextTreeTextElementNode.cs
- TextRunCacheImp.cs
- PeekCompletedEventArgs.cs
- ValidationErrorEventArgs.cs
- ObjectPropertyMapping.cs
- SerialReceived.cs
- ImageAnimator.cs
- Point4DValueSerializer.cs
- BindingList.cs
- PersonalizationStateQuery.cs
- UserControlParser.cs
- COAUTHIDENTITY.cs
- SoapAttributeAttribute.cs
- ButtonFlatAdapter.cs
- TriggerAction.cs
- SQlBooleanStorage.cs
- Site.cs
- StdRegProviderWrapper.cs
- StateMachineHelpers.cs
- Query.cs
- CurrentChangingEventArgs.cs
- CodeGenHelper.cs
- ResXDataNode.cs
- SplineQuaternionKeyFrame.cs
- TextBoxRenderer.cs
- CornerRadiusConverter.cs
- UpdateManifestForBrowserApplication.cs
- CommandHelpers.cs
- SqlCommandBuilder.cs
- HotCommands.cs
- SymmetricSecurityProtocol.cs
- ChannelReliableSession.cs
- NativeCppClassAttribute.cs
- UnsafeNativeMethods.cs
- FolderNameEditor.cs
- SByteConverter.cs
- ReflectEventDescriptor.cs
- CacheAxisQuery.cs
- FigureParagraph.cs
- Vector3DCollection.cs
- ExcCanonicalXml.cs
- SaveFileDialogDesigner.cs
- WarningException.cs
- TransformationRules.cs
- Int32CAMarshaler.cs
- SqlConnectionFactory.cs
- DrawingImage.cs
- BitmapImage.cs
- InfoCardCryptoHelper.cs
- FloaterBaseParaClient.cs
- ErrorWebPart.cs
- SubqueryRules.cs
- ObjectItemCachedAssemblyLoader.cs
- ArrayTypeMismatchException.cs
- WebBrowserHelper.cs
- ColumnHeader.cs
- PointAnimationUsingKeyFrames.cs
- OperationExecutionFault.cs
- _HelperAsyncResults.cs
- NumericExpr.cs
- TimeSpanStorage.cs
- ComponentEvent.cs
- TypeDescriptionProvider.cs
- PathGradientBrush.cs
- DataGridViewBindingCompleteEventArgs.cs
- StringFunctions.cs
- ChangePassword.cs
- CounterSample.cs