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
- ProfileModule.cs
- ReliabilityContractAttribute.cs
- BaseParaClient.cs
- ActionItem.cs
- SqlDeflator.cs
- cookieexception.cs
- WizardPanelChangingEventArgs.cs
- WeakHashtable.cs
- ContextMenuAutomationPeer.cs
- Peer.cs
- XmlReader.cs
- Int32Collection.cs
- PeerMaintainer.cs
- TextSelectionProcessor.cs
- DecodeHelper.cs
- HighlightVisual.cs
- ConsumerConnectionPoint.cs
- HttpContext.cs
- CodeMemberEvent.cs
- AdornerPresentationContext.cs
- DoubleUtil.cs
- PropertyGridCommands.cs
- TextBox.cs
- StreamInfo.cs
- FontConverter.cs
- ResolveCriteriaCD1.cs
- DataTableExtensions.cs
- SQLBinary.cs
- Peer.cs
- Bits.cs
- XPathItem.cs
- JoinSymbol.cs
- EditorZone.cs
- DesignConnection.cs
- WebConfigurationHostFileChange.cs
- DataServiceSaveChangesEventArgs.cs
- GenericTypeParameterBuilder.cs
- EncoderParameter.cs
- GcHandle.cs
- translator.cs
- BuildDependencySet.cs
- GenericAuthenticationEventArgs.cs
- RegexRunner.cs
- URIFormatException.cs
- EncodingTable.cs
- TemplateLookupAction.cs
- RequestNavigateEventArgs.cs
- ApplicationTrust.cs
- AssemblyLoader.cs
- ProjectionCamera.cs
- DCSafeHandle.cs
- InfoCardSymmetricCrypto.cs
- DataPagerFieldItem.cs
- EventLogPermission.cs
- BindStream.cs
- RuntimeArgumentHandle.cs
- VirtualPath.cs
- WebPartEditorCancelVerb.cs
- ObjectTag.cs
- FrameworkName.cs
- DirectionalLight.cs
- IfJoinedCondition.cs
- EmbossBitmapEffect.cs
- PropertyEmitterBase.cs
- bindurihelper.cs
- KeyProperty.cs
- RequestQueryParser.cs
- TreeViewEvent.cs
- DetailsViewUpdateEventArgs.cs
- ThreadInterruptedException.cs
- BuilderInfo.cs
- PropertyValueChangedEvent.cs
- RelationalExpressions.cs
- TreeNode.cs
- GeometryHitTestResult.cs
- IApplicationTrustManager.cs
- CellConstant.cs
- ObjectParameter.cs
- SqlClientFactory.cs
- SettingsSection.cs
- DataListItemCollection.cs
- ProcessStartInfo.cs
- CornerRadius.cs
- SQLInt32Storage.cs
- UIElementParagraph.cs
- MarkedHighlightComponent.cs
- SQLDateTimeStorage.cs
- ProfileBuildProvider.cs
- CodeDomDecompiler.cs
- ServicesUtilities.cs
- Attributes.cs
- ITextView.cs
- EUCJPEncoding.cs
- mda.cs
- MaterialCollection.cs
- RTTypeWrapper.cs
- ECDiffieHellmanCngPublicKey.cs
- UndoEngine.cs
- DataReaderContainer.cs
- CreateParams.cs