Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / 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. //---------------------------------------------------------------------------- // // 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
- HttpContext.cs
- FormatException.cs
- querybuilder.cs
- MissingManifestResourceException.cs
- Profiler.cs
- MonthChangedEventArgs.cs
- DecoderReplacementFallback.cs
- ExpressionList.cs
- TrackBarRenderer.cs
- DBSqlParserColumnCollection.cs
- SpeechEvent.cs
- SortedDictionary.cs
- DataSourceDescriptorCollection.cs
- WebResourceAttribute.cs
- CompilerInfo.cs
- CommonRemoteMemoryBlock.cs
- TreeView.cs
- IgnorePropertiesAttribute.cs
- RandomDelayQueuedSendsAsyncResult.cs
- FormViewPageEventArgs.cs
- HealthMonitoringSection.cs
- Expander.cs
- PeerCollaboration.cs
- BaseCAMarshaler.cs
- ProfilePropertyNameValidator.cs
- AuthenticationModuleElementCollection.cs
- WorkflowMarkupSerializationManager.cs
- JavaScriptString.cs
- RegionIterator.cs
- DefaultEvaluationContext.cs
- XmlNodeChangedEventArgs.cs
- TableCellCollection.cs
- DetailsViewRowCollection.cs
- KeyEvent.cs
- ReliableOutputConnection.cs
- UniformGrid.cs
- ActivityTypeCodeDomSerializer.cs
- ApplicationDirectory.cs
- AspCompat.cs
- NativeMethods.cs
- PackagingUtilities.cs
- SmiEventSink.cs
- Executor.cs
- XmlElementAttributes.cs
- PermissionRequestEvidence.cs
- DataBoundControlAdapter.cs
- SplitterPanel.cs
- XdrBuilder.cs
- ToggleProviderWrapper.cs
- PermissionAttributes.cs
- RuleSetDialog.cs
- FileUpload.cs
- RectangleGeometry.cs
- LineServices.cs
- ParentQuery.cs
- WCFServiceClientProxyGenerator.cs
- AsymmetricSignatureFormatter.cs
- InputScopeManager.cs
- TextTreeInsertElementUndoUnit.cs
- DataGridHyperlinkColumn.cs
- SqlIdentifier.cs
- Speller.cs
- ParserContext.cs
- MonthCalendar.cs
- UndirectedGraph.cs
- MatrixKeyFrameCollection.cs
- CompiledAction.cs
- CheckedPointers.cs
- SqlCacheDependency.cs
- SecurityHeaderTokenResolver.cs
- StoragePropertyMapping.cs
- ComAdminInterfaces.cs
- Utility.cs
- DrawListViewColumnHeaderEventArgs.cs
- UserControl.cs
- SqlWebEventProvider.cs
- MimeXmlImporter.cs
- UIHelper.cs
- ConfigurationSettings.cs
- WebSysDefaultValueAttribute.cs
- SystemException.cs
- HttpProfileBase.cs
- COM2ExtendedBrowsingHandler.cs
- SynchronizedInputHelper.cs
- RowUpdatingEventArgs.cs
- TextTreeFixupNode.cs
- MetadataArtifactLoaderFile.cs
- XmlUrlResolver.cs
- DataGridItemEventArgs.cs
- WebPartZoneCollection.cs
- Group.cs
- ImportContext.cs
- WindowsToolbarItemAsMenuItem.cs
- DoubleAnimationClockResource.cs
- ScrollBar.cs
- WebPartZoneBase.cs
- TextCompositionManager.cs
- DataServiceQuery.cs
- InProcStateClientManager.cs
- Int32RectConverter.cs