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
- FixedSOMTableCell.cs
- CardSpaceException.cs
- XmlHierarchicalEnumerable.cs
- HostedTransportConfigurationBase.cs
- OperatingSystem.cs
- MethodRental.cs
- MediaSystem.cs
- XmlSignatureManifest.cs
- HebrewCalendar.cs
- Sentence.cs
- OdbcErrorCollection.cs
- TypeHelper.cs
- xmlsaver.cs
- HtmlLink.cs
- HtmlGenericControl.cs
- WorkflowElementDialogWindow.xaml.cs
- EntityConnection.cs
- ObjRef.cs
- CodeTypeParameterCollection.cs
- Imaging.cs
- ClientSettingsProvider.cs
- UnsafeNativeMethods.cs
- WhitespaceRuleReader.cs
- SourceFileInfo.cs
- SimpleType.cs
- SelectionWordBreaker.cs
- TextContainerChangeEventArgs.cs
- ComponentResourceKeyConverter.cs
- SQLSingle.cs
- _ScatterGatherBuffers.cs
- ItemDragEvent.cs
- MiniCustomAttributeInfo.cs
- XmlWellformedWriterHelpers.cs
- BoolExpression.cs
- PolicyUnit.cs
- InstanceBehavior.cs
- VScrollProperties.cs
- FontResourceCache.cs
- ParallelSeparator.xaml.cs
- MenuEventArgs.cs
- SearchExpression.cs
- WmiInstallComponent.cs
- IISMapPath.cs
- TextTreeNode.cs
- NamespaceQuery.cs
- RefreshPropertiesAttribute.cs
- PermissionListSet.cs
- ListViewInsertionMark.cs
- TemplateControlBuildProvider.cs
- CheckBoxFlatAdapter.cs
- ConfigXmlWhitespace.cs
- QueryExecutionOption.cs
- AuthenticatedStream.cs
- XmlEnumAttribute.cs
- SecurityChannelFaultConverter.cs
- EncodingTable.cs
- URL.cs
- DoubleCollectionValueSerializer.cs
- IMembershipProvider.cs
- FontClient.cs
- ElementHost.cs
- StateRuntime.cs
- Pointer.cs
- CheckBoxBaseAdapter.cs
- Section.cs
- CustomBindingElement.cs
- ExpressionPrinter.cs
- XmlCharCheckingWriter.cs
- XslAstAnalyzer.cs
- Dictionary.cs
- GlyphRunDrawing.cs
- NumberFunctions.cs
- LineGeometry.cs
- HtmlElementErrorEventArgs.cs
- SupportingTokenSpecification.cs
- SoapReflectionImporter.cs
- ArrayElementGridEntry.cs
- DiagnosticsConfigurationHandler.cs
- ContainerParaClient.cs
- ImageSourceTypeConverter.cs
- GatewayDefinition.cs
- AddInProcess.cs
- Token.cs
- PointAnimationUsingKeyFrames.cs
- Rotation3DAnimationBase.cs
- DataSvcMapFileSerializer.cs
- BitmapEffect.cs
- ServicesUtilities.cs
- ExpressionStringBuilder.cs
- Int64Converter.cs
- WaveHeader.cs
- DataRowView.cs
- FormView.cs
- SendMailErrorEventArgs.cs
- DateTimeUtil.cs
- MasterPageParser.cs
- DrawingAttributes.cs
- SocketSettings.cs
- LinkUtilities.cs
- SmtpLoginAuthenticationModule.cs