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
- IIS7WorkerRequest.cs
- Property.cs
- GPPOINT.cs
- DBCSCodePageEncoding.cs
- XamlSerializerUtil.cs
- FixedLineResult.cs
- Privilege.cs
- RuntimeWrappedException.cs
- HttpSocketManager.cs
- ConditionalAttribute.cs
- ConsumerConnectionPointCollection.cs
- HashCodeCombiner.cs
- TimeSpanMinutesConverter.cs
- QilBinary.cs
- HttpFileCollection.cs
- diagnosticsswitches.cs
- WebRequest.cs
- RequestQueryParser.cs
- SignHashRequest.cs
- DocumentEventArgs.cs
- DataObjectFieldAttribute.cs
- UniqueConstraint.cs
- SafeViewOfFileHandle.cs
- TextServicesCompartment.cs
- AnnotationHelper.cs
- Registry.cs
- EndOfStreamException.cs
- XmlnsDictionary.cs
- SizeAnimationBase.cs
- QueryOutputWriterV1.cs
- CharEntityEncoderFallback.cs
- HopperCache.cs
- WeakEventManager.cs
- WebEventTraceProvider.cs
- XsltInput.cs
- LinearGradientBrush.cs
- ParserExtension.cs
- XPathConvert.cs
- SQLString.cs
- ZipIOLocalFileDataDescriptor.cs
- DesignerView.Commands.cs
- MethodCallExpression.cs
- GridLengthConverter.cs
- DtrList.cs
- COM2ComponentEditor.cs
- TheQuery.cs
- XmlSerializationWriter.cs
- XPathNavigatorReader.cs
- DebugTraceHelper.cs
- StringValidator.cs
- IisTraceListener.cs
- UnhandledExceptionEventArgs.cs
- CalendarSelectionChangedEventArgs.cs
- ContextDataSource.cs
- TextLineResult.cs
- ModelService.cs
- ProviderUtil.cs
- Lasso.cs
- ExcCanonicalXml.cs
- GenericWebPart.cs
- HideDisabledControlAdapter.cs
- TransportDefaults.cs
- Label.cs
- Stream.cs
- FormsAuthenticationEventArgs.cs
- UInt32Converter.cs
- XmlSchemaGroup.cs
- NavigationExpr.cs
- SafeNativeMethodsMilCoreApi.cs
- DataRowCollection.cs
- OwnerDrawPropertyBag.cs
- QilTargetType.cs
- FormsAuthenticationCredentials.cs
- OrthographicCamera.cs
- InvalidWMPVersionException.cs
- SerializationEventsCache.cs
- XmlValidatingReader.cs
- TextParentUndoUnit.cs
- HtmlControlPersistable.cs
- EntityContainerEntitySet.cs
- DecimalConverter.cs
- ApplicationServiceManager.cs
- DependencyPropertyKey.cs
- SystemFonts.cs
- QilFunction.cs
- SqlDependencyListener.cs
- TripleDESCryptoServiceProvider.cs
- RecognizeCompletedEventArgs.cs
- SiteOfOriginContainer.cs
- HandleExceptionArgs.cs
- PropertyTab.cs
- CodeAccessSecurityEngine.cs
- Material.cs
- DesignColumn.cs
- SecuritySessionFilter.cs
- WindowsScrollBarBits.cs
- UDPClient.cs
- ModulesEntry.cs
- FrameworkPropertyMetadata.cs
- XslCompiledTransform.cs