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
- XPathScanner.cs
- RijndaelManaged.cs
- SignedXml.cs
- ManifestSignatureInformation.cs
- OdbcUtils.cs
- LabelLiteral.cs
- DockProviderWrapper.cs
- CategoryGridEntry.cs
- SqlRowUpdatedEvent.cs
- Form.cs
- Int32CollectionValueSerializer.cs
- XmlQualifiedNameTest.cs
- NamespaceCollection.cs
- SqlDataAdapter.cs
- BehaviorEditorPart.cs
- TabPanel.cs
- AnnotationMap.cs
- EventDescriptor.cs
- SqlStream.cs
- HTMLTagNameToTypeMapper.cs
- DispatcherEventArgs.cs
- DataTableMapping.cs
- Material.cs
- ConfigXmlDocument.cs
- ApplicationInterop.cs
- ManagementPath.cs
- ServiceDebugElement.cs
- DbProviderManifest.cs
- ToolBarButton.cs
- XPathNodeHelper.cs
- NativeWindow.cs
- StringWriter.cs
- ChtmlTextBoxAdapter.cs
- RuleInfoComparer.cs
- ContentValidator.cs
- AesManaged.cs
- TextDecorationCollectionConverter.cs
- VerificationAttribute.cs
- ProcessInfo.cs
- XmlArrayItemAttribute.cs
- FrameSecurityDescriptor.cs
- TTSEvent.cs
- OdbcParameterCollection.cs
- ListItemParagraph.cs
- QilFactory.cs
- JobPageOrder.cs
- DbReferenceCollection.cs
- SessionSwitchEventArgs.cs
- DocumentCollection.cs
- QueryConverter.cs
- OdbcCommand.cs
- ObjectListGeneralPage.cs
- AVElementHelper.cs
- Menu.cs
- EncodingInfo.cs
- BaseDataList.cs
- ColorTranslator.cs
- EventDescriptor.cs
- DBSqlParser.cs
- TypeSystem.cs
- QilFactory.cs
- StringSource.cs
- WebPartEditVerb.cs
- BooleanStorage.cs
- WebPartDeleteVerb.cs
- TransformerInfo.cs
- Parameter.cs
- DbUpdateCommandTree.cs
- BlurBitmapEffect.cs
- ConfigurationElementProperty.cs
- SqlDataSourceFilteringEventArgs.cs
- ToolTipService.cs
- XmlSerializationGeneratedCode.cs
- ViewSimplifier.cs
- EntityDataSourceChangedEventArgs.cs
- SafeReversePInvokeHandle.cs
- Decoder.cs
- OrthographicCamera.cs
- Keywords.cs
- Debug.cs
- DesignerToolStripControlHost.cs
- VBCodeProvider.cs
- CLSCompliantAttribute.cs
- UniformGrid.cs
- ComAdminWrapper.cs
- FixedTextContainer.cs
- DiscoveryReference.cs
- MDIWindowDialog.cs
- XmlBaseWriter.cs
- CodeCastExpression.cs
- SafeThemeHandle.cs
- IPGlobalProperties.cs
- WebPartConnection.cs
- QuaternionValueSerializer.cs
- PersonalizablePropertyEntry.cs
- RemoteWebConfigurationHostServer.cs
- SrgsOneOf.cs
- ToolStripDropDownMenu.cs
- DocumentAutomationPeer.cs
- HttpClientCertificate.cs