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
- ListView.cs
- Timeline.cs
- PropertyEmitterBase.cs
- BasicCommandTreeVisitor.cs
- Events.cs
- OrthographicCamera.cs
- COM2PictureConverter.cs
- ToggleButton.cs
- HighContrastHelper.cs
- SqlDataSourceCommandEventArgs.cs
- QilXmlWriter.cs
- ModuleBuilder.cs
- TransformValueSerializer.cs
- AccessorTable.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- DesignerOptionService.cs
- DataGridViewCellCollection.cs
- BamlBinaryWriter.cs
- ValidateNames.cs
- DbConnectionClosed.cs
- _BasicClient.cs
- MemoryMappedFileSecurity.cs
- DoubleConverter.cs
- QueryOpeningEnumerator.cs
- HttpCapabilitiesBase.cs
- DataGridViewRowConverter.cs
- Completion.cs
- TextEditorCopyPaste.cs
- CodeDefaultValueExpression.cs
- odbcmetadatacollectionnames.cs
- DataGridViewColumnConverter.cs
- HashLookup.cs
- VisualTreeUtils.cs
- XamlReader.cs
- WmpBitmapDecoder.cs
- OrderByQueryOptionExpression.cs
- ListBase.cs
- LogLogRecord.cs
- MetaForeignKeyColumn.cs
- SqlEnums.cs
- DetailsViewPageEventArgs.cs
- DetailsViewDeleteEventArgs.cs
- CodeTypeParameterCollection.cs
- SimpleHandlerFactory.cs
- PointValueSerializer.cs
- EncryptedKeyIdentifierClause.cs
- XmlAttributes.cs
- TypedColumnHandler.cs
- OrderByBuilder.cs
- TableCellCollection.cs
- KerberosRequestorSecurityTokenAuthenticator.cs
- Rotation3D.cs
- VisemeEventArgs.cs
- WindowsHyperlink.cs
- ServiceDescriptionReflector.cs
- Int32KeyFrameCollection.cs
- WindowShowOrOpenTracker.cs
- PointConverter.cs
- ProjectionNode.cs
- RuleSettingsCollection.cs
- MULTI_QI.cs
- FlatButtonAppearance.cs
- XsdValidatingReader.cs
- EventManager.cs
- CodeDefaultValueExpression.cs
- CharAnimationUsingKeyFrames.cs
- JsonByteArrayDataContract.cs
- SqlSupersetValidator.cs
- PrintEvent.cs
- OperationAbortedException.cs
- LinqToSqlWrapper.cs
- WindowsBrush.cs
- DirectoryNotFoundException.cs
- ThreadAbortException.cs
- NetCodeGroup.cs
- DataGridViewCellStyleConverter.cs
- TabPanel.cs
- ProfileGroupSettings.cs
- WebContext.cs
- GB18030Encoding.cs
- RuleInfoComparer.cs
- CreateUserErrorEventArgs.cs
- XmlImplementation.cs
- BitVector32.cs
- wgx_render.cs
- ElapsedEventArgs.cs
- BinaryParser.cs
- _TimerThread.cs
- TreeNodeCollection.cs
- DocumentGridContextMenu.cs
- PartitionerStatic.cs
- securitycriticaldata.cs
- Effect.cs
- Page.cs
- Scheduling.cs
- UpdateTracker.cs
- DataError.cs
- CharKeyFrameCollection.cs
- ContextStaticAttribute.cs
- GenericQueueSurrogate.cs