Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / TextBlockAutomationPeer.cs / 1305600 / 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
- ByteArrayHelperWithString.cs
- RSACryptoServiceProvider.cs
- NetworkInformationException.cs
- GlyphCache.cs
- ResetableIterator.cs
- InputGestureCollection.cs
- Comparer.cs
- NativeConfigurationLoader.cs
- ProfileSettings.cs
- externdll.cs
- StateManagedCollection.cs
- SecurityContext.cs
- TextSelectionProcessor.cs
- InfoCardClaimCollection.cs
- ClientFormsIdentity.cs
- PropertyEntry.cs
- ACE.cs
- QueryPageSettingsEventArgs.cs
- BoundColumn.cs
- WindowsSolidBrush.cs
- XmlSchemaSimpleContentExtension.cs
- Point3DCollection.cs
- ReversePositionQuery.cs
- HttpProtocolImporter.cs
- BooleanAnimationUsingKeyFrames.cs
- ListViewGroupItemCollection.cs
- CommandID.cs
- PropertyManager.cs
- WizardStepCollectionEditor.cs
- FontFamily.cs
- TreeViewImageGenerator.cs
- HebrewNumber.cs
- InfocardExtendedInformationCollection.cs
- SqlDeflator.cs
- GuidTagList.cs
- HashCryptoHandle.cs
- KeyboardNavigation.cs
- RoutedEventArgs.cs
- MultilineStringEditor.cs
- KnownBoxes.cs
- ValidatorCompatibilityHelper.cs
- CqlBlock.cs
- DbProviderFactoriesConfigurationHandler.cs
- MimeImporter.cs
- NumberFormatInfo.cs
- exports.cs
- RelationshipManager.cs
- LinqDataSourceContextData.cs
- SessionStateContainer.cs
- IImplicitResourceProvider.cs
- PropertyDescriptorComparer.cs
- SafeNativeMethods.cs
- RouteParametersHelper.cs
- PassportIdentity.cs
- ScalarConstant.cs
- XmlWrappingReader.cs
- WindowsFont.cs
- FixedPageStructure.cs
- Bitmap.cs
- SequenceNumber.cs
- mediapermission.cs
- ObjectDataSourceFilteringEventArgs.cs
- TPLETWProvider.cs
- ArcSegment.cs
- Mapping.cs
- MetadataHelper.cs
- Label.cs
- UIPropertyMetadata.cs
- WebPartCloseVerb.cs
- TypeValidationEventArgs.cs
- AnimationException.cs
- Psha1DerivedKeyGeneratorHelper.cs
- DeviceOverridableAttribute.cs
- KeyTime.cs
- ColumnHeader.cs
- ConfigurationCollectionAttribute.cs
- ContextTokenTypeConverter.cs
- SingleSelectRootGridEntry.cs
- ColumnWidthChangingEvent.cs
- ConstructorNeedsTagAttribute.cs
- DisposableCollectionWrapper.cs
- AssemblyName.cs
- WhitespaceRuleLookup.cs
- QueryConverter.cs
- SQLInt16Storage.cs
- HeaderPanel.cs
- BreakRecordTable.cs
- PlatformNotSupportedException.cs
- MemoryFailPoint.cs
- XPathNodeHelper.cs
- AsynchronousChannelMergeEnumerator.cs
- SafeCryptHandles.cs
- HuffmanTree.cs
- ComponentSerializationService.cs
- JsonDeserializer.cs
- SafeHandles.cs
- SecureConversationServiceCredential.cs
- Int16AnimationBase.cs
- BaseDataBoundControlDesigner.cs
- MethodBuilder.cs