Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / System / Windows / Automation / Peers / TextAutomationPeer.cs / 1 / TextAutomationPeer.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: ContentTextElementAutomationPeer.cs // // Description: Base class for AutomationPeers associated with TextPattern. // //--------------------------------------------------------------------------- using System.Collections.Generic; // Listusing System.Windows.Automation.Provider; // IRawElementProviderSimple using System.Windows.Documents; // ITextPointer namespace System.Windows.Automation.Peers { /// /// Base class for AutomationPeers associated with TextPattern. /// public abstract class TextAutomationPeer : FrameworkElementAutomationPeer { ////// Constructor. /// protected TextAutomationPeer(FrameworkElement owner) : base(owner) {} ////// GetNameCore will return a value matching (in priority order) /// /// 1. Automation.Name /// 2. GetLabeledBy.Name /// 3. String.Empty /// /// This differs from the base implementation in that we must /// never return GetPlainText() . /// override protected string GetNameCore() { string result = AutomationProperties.GetName(this.Owner); if (string.IsNullOrEmpty(result)) { AutomationPeer labelAutomationPeer = GetLabeledByCore(); if (labelAutomationPeer != null) { result = labelAutomationPeer.GetName(); } } return result ?? string.Empty; } ////// Maps AutomationPeer to provider object. /// internal new IRawElementProviderSimple ProviderFromPeer(AutomationPeer peer) { return base.ProviderFromPeer(peer); } ////// Maps automation provider to DependencyObject. /// internal DependencyObject ElementFromProvider(IRawElementProviderSimple provider) { DependencyObject element = null; AutomationPeer peer = PeerFromProvider(provider); if (peer is UIElementAutomationPeer) { element = ((UIElementAutomationPeer)peer).Owner; } else if (peer is ContentElementAutomationPeer) { element = ((ContentElementAutomationPeer)peer).Owner; } return element; } ////// Gets collection of AutomationPeers for given text range. /// internal abstract ListGetAutomationPeersFromRange(ITextPointer start, ITextPointer end); } } // 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
- UnionExpr.cs
- GPStream.cs
- WebHeaderCollection.cs
- ImageDrawing.cs
- ByteArrayHelperWithString.cs
- _TimerThread.cs
- counter.cs
- SyndicationCategory.cs
- XmlNodeWriter.cs
- XmlSchemaSimpleType.cs
- ExceptionValidationRule.cs
- X509SecurityTokenAuthenticator.cs
- ObjectQuery.cs
- DataContractSerializerSection.cs
- EntityProxyTypeInfo.cs
- ServiceBehaviorElementCollection.cs
- IntSecurity.cs
- dbenumerator.cs
- AggregateNode.cs
- LockedAssemblyCache.cs
- SafeSecurityHandles.cs
- RichListBox.cs
- GPPOINTF.cs
- TypeLibConverter.cs
- metrodevice.cs
- IssuedSecurityTokenProvider.cs
- ReferencedType.cs
- NavigationProperty.cs
- MaterialGroup.cs
- BindingList.cs
- ControlUtil.cs
- ServiceModelStringsVersion1.cs
- PeerApplicationLaunchInfo.cs
- Base64Encoder.cs
- ExceptionTrace.cs
- TimerElapsedEvenArgs.cs
- DesignerDataView.cs
- RegexGroupCollection.cs
- SqlAggregateChecker.cs
- FixedPageStructure.cs
- Site.cs
- GlobalEventManager.cs
- AuthorizationRule.cs
- ReferencedCollectionType.cs
- AssemblyCollection.cs
- SynchronousChannel.cs
- DataGridViewRowHeaderCell.cs
- ProfileManager.cs
- _BufferOffsetSize.cs
- StrongName.cs
- X509Certificate.cs
- StreamedWorkflowDefinitionContext.cs
- ServiceOperationInfoTypeConverter.cs
- SqlBulkCopyColumnMapping.cs
- DataGridViewRowStateChangedEventArgs.cs
- XmlElementAttributes.cs
- StringPropertyBuilder.cs
- QueryExtender.cs
- RootCodeDomSerializer.cs
- ElementMarkupObject.cs
- SafeNativeMethods.cs
- DynamicFilterExpression.cs
- HyperLinkColumn.cs
- WebControlAdapter.cs
- ProgressBarBrushConverter.cs
- WebPartDisplayModeEventArgs.cs
- RegexCompiler.cs
- VisualStateManager.cs
- WindowsSecurityToken.cs
- LocalValueEnumerator.cs
- InternalsVisibleToAttribute.cs
- ObjectView.cs
- ServicesUtilities.cs
- DataColumnPropertyDescriptor.cs
- PolicyException.cs
- NavigationHelper.cs
- remotingproxy.cs
- Window.cs
- DataSourceXmlAttributeAttribute.cs
- ArraySegment.cs
- DateBoldEvent.cs
- GridViewAutomationPeer.cs
- ActiveXSite.cs
- listviewsubitemcollectioneditor.cs
- XmlCDATASection.cs
- Point3DConverter.cs
- WebPartDescriptionCollection.cs
- DataListCommandEventArgs.cs
- WebPartMenuStyle.cs
- ProcessProtocolHandler.cs
- activationcontext.cs
- TreeNodeBinding.cs
- HelpProvider.cs
- OutputScope.cs
- HandleExceptionArgs.cs
- TextTreeText.cs
- HttpsTransportBindingElement.cs
- ErrorFormatterPage.cs
- CriticalFinalizerObject.cs
- CqlLexerHelpers.cs