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
- HMACMD5.cs
- TextWriterTraceListener.cs
- DBCommand.cs
- LZCodec.cs
- UserValidatedEventArgs.cs
- HMACRIPEMD160.cs
- HtmlInputButton.cs
- sortedlist.cs
- XmlQualifiedName.cs
- TextServicesCompartment.cs
- WmpBitmapEncoder.cs
- Container.cs
- GridViewRowEventArgs.cs
- InstancePersistenceEvent.cs
- CopyNamespacesAction.cs
- IteratorDescriptor.cs
- ViewStateException.cs
- FileUtil.cs
- SharedConnectionListener.cs
- XmlSchemaObjectCollection.cs
- SqlCommandSet.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- URIFormatException.cs
- NonDualMessageSecurityOverHttp.cs
- ThreadStaticAttribute.cs
- VisualBrush.cs
- ItemCheckEvent.cs
- WeakHashtable.cs
- SvcMapFileLoader.cs
- FileLoadException.cs
- DataSourceHelper.cs
- XPathAncestorQuery.cs
- GridViewColumnCollection.cs
- ColumnMap.cs
- BamlCollectionHolder.cs
- CodeExporter.cs
- Rotation3DAnimation.cs
- Flowchart.cs
- ValidationSummaryDesigner.cs
- DocumentSchemaValidator.cs
- BaseTemplateBuildProvider.cs
- XmlTypeMapping.cs
- ClientSettingsSection.cs
- SqlDataSourceView.cs
- WebEventTraceProvider.cs
- DataSourceXmlSubItemAttribute.cs
- PointF.cs
- DataGridViewRowPostPaintEventArgs.cs
- SafeTimerHandle.cs
- PrintDialog.cs
- Error.cs
- TagMapInfo.cs
- UmAlQuraCalendar.cs
- Transform.cs
- _OverlappedAsyncResult.cs
- RichTextBoxAutomationPeer.cs
- Scheduler.cs
- SignatureToken.cs
- ListBox.cs
- SqlUnionizer.cs
- GPPOINT.cs
- ButtonColumn.cs
- PrintControllerWithStatusDialog.cs
- XmlSerializableServices.cs
- SessionStateItemCollection.cs
- FileLogRecordHeader.cs
- ConstraintStruct.cs
- ClickablePoint.cs
- XPathLexer.cs
- DataSet.cs
- SrgsRuleRef.cs
- ListControlDesigner.cs
- PropertySegmentSerializer.cs
- SettingsBindableAttribute.cs
- DbUpdateCommandTree.cs
- SchemaImporterExtensionsSection.cs
- DbConnectionPoolGroup.cs
- CopyOnWriteList.cs
- AtomServiceDocumentSerializer.cs
- ReadOnlyObservableCollection.cs
- InheritanceAttribute.cs
- ListArgumentProvider.cs
- GroupDescription.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- RoutedPropertyChangedEventArgs.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- NavigationFailedEventArgs.cs
- SoapReflectionImporter.cs
- PhysicalFontFamily.cs
- SelectionProviderWrapper.cs
- ReachFixedPageSerializerAsync.cs
- RegexFCD.cs
- UnknownBitmapDecoder.cs
- SamlSubject.cs
- RichTextBoxAutomationPeer.cs
- DialogResultConverter.cs
- XmlEnumAttribute.cs
- nulltextcontainer.cs
- InvalidStoreProtectionKeyException.cs
- CodeConditionStatement.cs