Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: TextBlockAutomationPeer.cs // // Description: AutomationPeer associated with TextBlock. // //--------------------------------------------------------------------------- using System.Collections.Generic; // List/// using 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
- DocumentProperties.cs
- RepeatInfo.cs
- AutomationEventArgs.cs
- UDPClient.cs
- Cursors.cs
- WebPartDisplayModeEventArgs.cs
- ScriptResourceAttribute.cs
- AddingNewEventArgs.cs
- RestHandlerFactory.cs
- SectionUpdates.cs
- SafeFileHandle.cs
- BamlRecords.cs
- XmlArrayItemAttribute.cs
- TreeBuilderXamlTranslator.cs
- PropertyMetadata.cs
- ReachDocumentPageSerializer.cs
- XmlnsCompatibleWithAttribute.cs
- SafeHandle.cs
- MetadataSerializer.cs
- BindingContext.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- CharacterString.cs
- MenuAdapter.cs
- ApplicationGesture.cs
- WindowsFormsHost.cs
- WindowHideOrCloseTracker.cs
- HMAC.cs
- XmlDownloadManager.cs
- StatusBar.cs
- HtmlTableRowCollection.cs
- ActiveXContainer.cs
- ProviderConnectionPointCollection.cs
- WpfPayload.cs
- IndexerNameAttribute.cs
- ServiceEndpointElement.cs
- OSFeature.cs
- PropertyInformation.cs
- HttpModuleActionCollection.cs
- KeyMatchBuilder.cs
- ImageFormat.cs
- Cursors.cs
- backend.cs
- Size.cs
- TextCollapsingProperties.cs
- mediaeventargs.cs
- XmlSchemaAttributeGroup.cs
- AppDomainManager.cs
- Rule.cs
- DataGridViewBindingCompleteEventArgs.cs
- _SpnDictionary.cs
- TransactionsSectionGroup.cs
- Parser.cs
- SplineKeyFrames.cs
- DataGridViewTopRowAccessibleObject.cs
- DataBoundLiteralControl.cs
- _TimerThread.cs
- DirtyTextRange.cs
- HMACSHA1.cs
- SharingService.cs
- FileDialog_Vista.cs
- DateRangeEvent.cs
- HybridDictionary.cs
- PackWebRequest.cs
- WorkflowMarkupSerializationException.cs
- CustomCredentialPolicy.cs
- CqlGenerator.cs
- BaseAsyncResult.cs
- ClientProtocol.cs
- GeneralTransformGroup.cs
- MessageQueueCriteria.cs
- TabControlToolboxItem.cs
- ServiceModelEnumValidatorAttribute.cs
- PhysicalAddress.cs
- OperationCanceledException.cs
- XPathNavigatorReader.cs
- MediaCommands.cs
- FixedSOMLineRanges.cs
- ToolStripRenderer.cs
- SEHException.cs
- SelectedCellsChangedEventArgs.cs
- URLString.cs
- RC2.cs
- DiagnosticsConfigurationHandler.cs
- HandlerWithFactory.cs
- HandlerBase.cs
- ContractType.cs
- KnownBoxes.cs
- ObjectSecurityT.cs
- BitmapVisualManager.cs
- DBNull.cs
- WindowVisualStateTracker.cs
- XmlSchemaParticle.cs
- SimpleNameService.cs
- WindowsPrincipal.cs
- PageParserFilter.cs
- LocationSectionRecord.cs
- CategoryGridEntry.cs
- PingReply.cs
- CursorConverter.cs
- ProfileService.cs