Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / System / Windows / Automation / Peers / TextBlockAutomationPeer.cs / 1 / TextBlockAutomationPeer.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: TextBlockAutomationPeer.cs // // Description: AutomationPeer associated with TextBlock. // //--------------------------------------------------------------------------- using System.Collections.Generic; // Listusing System.Windows.Controls; // TextBlock using System.Windows.Documents; // ITextContainer using MS.Internal.Documents; // TextContainerHelper namespace System.Windows.Automation.Peers { /// /// AutomationPeer associated with TextBlock. /// public class TextBlockAutomationPeer : FrameworkElementAutomationPeer { ////// Constructor. /// /// Owner of the AutomationPeer. public TextBlockAutomationPeer(TextBlock owner) : base(owner) { } ////// protected override List/// GetChildrenCore() { List peers = null; TextBlock owner = (TextBlock)Owner; // TextBlock has children only if it has complex content. if (owner.HasComplexContent) { peers = TextContainerHelper.GetAutomationPeersFromRange(owner.TextContainer.Start, owner.TextContainer.End, null); } return peers; } /// /// protected override AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.Text; } ////// /// ////// protected override string GetClassNameCore() { return "TextBlock"; } /// /// override protected bool IsControlElementCore() { // Return true if TextBlock is not part of the style return ((TextBlock)Owner).TemplatedParent == null; } } } // 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
- HttpBufferlessInputStream.cs
- RelationshipEndCollection.cs
- StringHelper.cs
- BamlMapTable.cs
- Pen.cs
- SafeRightsManagementHandle.cs
- UniqueConstraint.cs
- Pair.cs
- Error.cs
- StyleBamlTreeBuilder.cs
- CultureInfoConverter.cs
- ObjectSet.cs
- AuthenticationException.cs
- SqlCacheDependency.cs
- BitmapCodecInfo.cs
- SplitterCancelEvent.cs
- ValidationManager.cs
- WorkflowMessageEventHandler.cs
- WebBrowserNavigatingEventHandler.cs
- Claim.cs
- SafeLibraryHandle.cs
- SudsCommon.cs
- ContractMapping.cs
- PolicyException.cs
- SqlBuffer.cs
- XmlSerializerAssemblyAttribute.cs
- util.cs
- SaveFileDialogDesigner.cs
- Debug.cs
- PropertyOrder.cs
- QueryInterceptorAttribute.cs
- XamlTypeMapper.cs
- TargetInvocationException.cs
- AdRotatorDesigner.cs
- _ProxyRegBlob.cs
- LineSegment.cs
- XmlAtomErrorReader.cs
- TextEditorCharacters.cs
- FindCompletedEventArgs.cs
- ClipboardProcessor.cs
- OdbcEnvironment.cs
- DataServiceContext.cs
- FrameworkReadOnlyPropertyMetadata.cs
- DocumentPaginator.cs
- TraceHandlerErrorFormatter.cs
- IndependentlyAnimatedPropertyMetadata.cs
- StateItem.cs
- UpdateManifestForBrowserApplication.cs
- HandlerBase.cs
- Italic.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- StylusDevice.cs
- XmlILCommand.cs
- BuilderInfo.cs
- IdentityModelDictionary.cs
- Sorting.cs
- localization.cs
- ConnectorRouter.cs
- AmbientProperties.cs
- DesignObjectWrapper.cs
- ViewStateModeByIdAttribute.cs
- HwndMouseInputProvider.cs
- AutomationPropertyInfo.cs
- MimePart.cs
- SimpleWebHandlerParser.cs
- shaper.cs
- HttpCachePolicyElement.cs
- PersonalizationProviderCollection.cs
- DefaultTextStore.cs
- LinkConverter.cs
- PartialCachingControl.cs
- StretchValidation.cs
- SharedConnectionListener.cs
- AsymmetricSignatureDeformatter.cs
- DescendantOverDescendantQuery.cs
- DeploymentExceptionMapper.cs
- ConnectionPoint.cs
- NativeMethods.cs
- SmiEventSink_Default.cs
- DuplicateWaitObjectException.cs
- controlskin.cs
- XmlBinaryReaderSession.cs
- ToolboxDataAttribute.cs
- RegexStringValidatorAttribute.cs
- DataGridViewRowPostPaintEventArgs.cs
- MemberDomainMap.cs
- CqlGenerator.cs
- SecurityContext.cs
- SqlResolver.cs
- TdsParserStateObject.cs
- QilSortKey.cs
- ResourceContainer.cs
- OdbcCommand.cs
- CharacterString.cs
- OrderPreservingMergeHelper.cs
- TextDocumentView.cs
- PassportIdentity.cs
- ToolboxItemAttribute.cs
- ComPersistableTypeElementCollection.cs
- EventProxy.cs