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
- CollectionViewProxy.cs
- ProxyFragment.cs
- StringBuilder.cs
- Point3D.cs
- CommandEventArgs.cs
- HtmlInputControl.cs
- WCFServiceClientProxyGenerator.cs
- PolygonHotSpot.cs
- ellipse.cs
- control.ime.cs
- PickDesigner.xaml.cs
- ImageKeyConverter.cs
- FormsIdentity.cs
- BitmapCache.cs
- SqlCrossApplyToCrossJoin.cs
- CodeCommentStatement.cs
- UIElementParagraph.cs
- EntityCollectionChangedParams.cs
- _ProxyChain.cs
- MessageTraceRecord.cs
- ChainedAsyncResult.cs
- sitestring.cs
- SubMenuStyle.cs
- XmlSequenceWriter.cs
- ElementHostAutomationPeer.cs
- AssemblyAttributesGoHere.cs
- NumberFormatter.cs
- GacUtil.cs
- _AutoWebProxyScriptHelper.cs
- SiteMapDataSourceDesigner.cs
- LinkTarget.cs
- ThreadExceptionDialog.cs
- InstanceContextMode.cs
- MethodBuilderInstantiation.cs
- RadioButtonStandardAdapter.cs
- EventProperty.cs
- RtfToken.cs
- BigInt.cs
- CellPartitioner.cs
- Pointer.cs
- PropertyValueChangedEvent.cs
- ListBoxItemWrapperAutomationPeer.cs
- GeometryDrawing.cs
- XmlDataDocument.cs
- AssemblySettingAttributes.cs
- InternalControlCollection.cs
- WorkflowMarkupElementEventArgs.cs
- FormViewInsertEventArgs.cs
- QueuePathEditor.cs
- RelatedEnd.cs
- GetUserPreferenceRequest.cs
- PassportIdentity.cs
- TreeViewAutomationPeer.cs
- RegexCode.cs
- RegexMatchCollection.cs
- uribuilder.cs
- BuildProviderUtils.cs
- HostSecurityManager.cs
- ToolBarTray.cs
- AutomationEvent.cs
- WorkflowInstanceRecord.cs
- UserControl.cs
- ShadowGlyph.cs
- PropertyIDSet.cs
- CheckBox.cs
- TextAdaptor.cs
- OdbcError.cs
- XmlUtf8RawTextWriter.cs
- ConfigDefinitionUpdates.cs
- EncodingTable.cs
- ICspAsymmetricAlgorithm.cs
- TriggerCollection.cs
- AccessibleObject.cs
- StoreAnnotationsMap.cs
- InstanceNotReadyException.cs
- WebPartTransformerAttribute.cs
- oledbconnectionstring.cs
- ParserHooks.cs
- SurrogateSelector.cs
- DSASignatureDeformatter.cs
- PlainXmlDeserializer.cs
- IISMapPath.cs
- WorkflowCreationContext.cs
- SingleQueryOperator.cs
- DateTimeEditor.cs
- TextDocumentView.cs
- TextDecoration.cs
- LinkConverter.cs
- ObjectDataSourceView.cs
- ReturnType.cs
- IgnoreFileBuildProvider.cs
- ByteStack.cs
- TextTreeFixupNode.cs
- StringCollection.cs
- FrameworkTextComposition.cs
- CodeSubDirectory.cs
- UInt32Storage.cs
- TrackingMemoryStream.cs
- FixedPageStructure.cs
- GroupPartitionExpr.cs