Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- ToolboxComponentsCreatedEventArgs.cs
- DataGridViewHitTestInfo.cs
- UnauthorizedAccessException.cs
- ValidationError.cs
- Events.cs
- NullableLongSumAggregationOperator.cs
- BuildProvidersCompiler.cs
- FileUtil.cs
- XamlSerializerUtil.cs
- ParserOptions.cs
- SiteMapPath.cs
- tooltip.cs
- Logging.cs
- FixedFindEngine.cs
- JsonEnumDataContract.cs
- WindowsSpinner.cs
- UnitySerializationHolder.cs
- _Connection.cs
- ListViewTableRow.cs
- TimelineCollection.cs
- ToolStripRenderer.cs
- CompilerWrapper.cs
- ThumbAutomationPeer.cs
- XmlSchemaSimpleTypeRestriction.cs
- shaperfactory.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- documentsequencetextcontainer.cs
- dataSvcMapFileLoader.cs
- ComboBoxDesigner.cs
- NavigationWindowAutomationPeer.cs
- HashHelper.cs
- MetabaseSettingsIis7.cs
- DataGridViewTextBoxCell.cs
- CodeAccessSecurityEngine.cs
- PassportPrincipal.cs
- MemoryPressure.cs
- TCPClient.cs
- PixelShader.cs
- MarkupCompiler.cs
- TemplateApplicationHelper.cs
- EntityFunctions.cs
- LinqExpressionNormalizer.cs
- RelationshipFixer.cs
- DrawingBrush.cs
- DependencyPropertyKind.cs
- UIAgentRequest.cs
- AttributeProviderAttribute.cs
- TypeConverterHelper.cs
- HebrewCalendar.cs
- SQLUtility.cs
- QueryReaderSettings.cs
- RunClient.cs
- EventBuilder.cs
- DictionaryEntry.cs
- SiblingIterators.cs
- DateRangeEvent.cs
- FrameworkContentElement.cs
- CompiledScopeCriteria.cs
- ToolboxComponentsCreatedEventArgs.cs
- XmlIlTypeHelper.cs
- _HTTPDateParse.cs
- DataGridViewCheckBoxCell.cs
- DPCustomTypeDescriptor.cs
- AnonymousIdentificationSection.cs
- ServiceReference.cs
- ResolveNameEventArgs.cs
- DataTableTypeConverter.cs
- XmlSchemaAll.cs
- FileLogRecordStream.cs
- EllipseGeometry.cs
- DbModificationCommandTree.cs
- DoubleLink.cs
- ComponentEvent.cs
- XmlHierarchyData.cs
- FrameworkContentElement.cs
- ServiceReference.cs
- ImageCodecInfoPrivate.cs
- MessageBox.cs
- ThreadInterruptedException.cs
- ECDiffieHellman.cs
- NameService.cs
- LoadItemsEventArgs.cs
- CommandLineParser.cs
- WhiteSpaceTrimStringConverter.cs
- ToolStripManager.cs
- DbConnectionPoolOptions.cs
- GlyphRunDrawing.cs
- TranslateTransform.cs
- SqlTriggerAttribute.cs
- PerformanceCounter.cs
- ToolStripSeparatorRenderEventArgs.cs
- IncrementalHitTester.cs
- Mapping.cs
- ConditionalAttribute.cs
- CredentialCache.cs
- PrintControllerWithStatusDialog.cs
- MimeAnyImporter.cs
- QueryContinueDragEventArgs.cs
- odbcmetadatafactory.cs
- OleDbStruct.cs