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
- SystemDropShadowChrome.cs
- GenericTextProperties.cs
- CodeNamespaceImport.cs
- HttpCookiesSection.cs
- DataGridViewCellPaintingEventArgs.cs
- StatusBarPanel.cs
- EntityFunctions.cs
- XmlTextAttribute.cs
- TemplateControlParser.cs
- InvalidDataContractException.cs
- VarInfo.cs
- VisualStyleRenderer.cs
- ErrorsHelper.cs
- PenLineJoinValidation.cs
- ClosableStream.cs
- Pen.cs
- WindowsListViewGroup.cs
- EdmFunctions.cs
- ConnectAlgorithms.cs
- LicenseContext.cs
- XmlNamespaceMapping.cs
- DataServiceRequestOfT.cs
- Empty.cs
- SchemaDeclBase.cs
- Globals.cs
- BoundsDrawingContextWalker.cs
- Pointer.cs
- WizardPanelChangingEventArgs.cs
- BitmapEffectDrawing.cs
- SessionStateUtil.cs
- CodeEventReferenceExpression.cs
- LongAverageAggregationOperator.cs
- SqlProfileProvider.cs
- dtdvalidator.cs
- ResourcePermissionBase.cs
- FrameworkContextData.cs
- ExpressionList.cs
- Part.cs
- XmlCountingReader.cs
- CannotUnloadAppDomainException.cs
- DeflateStream.cs
- odbcmetadatafactory.cs
- SqlException.cs
- Decorator.cs
- InternalDispatchObject.cs
- HttpCookie.cs
- GeometryDrawing.cs
- RoleManagerSection.cs
- ApplicationDirectory.cs
- Brush.cs
- HandoffBehavior.cs
- LocalTransaction.cs
- InvokeSchedule.cs
- TimeSpan.cs
- PackageDigitalSignatureManager.cs
- DateTimeParse.cs
- BasePropertyDescriptor.cs
- ToolStripDesignerAvailabilityAttribute.cs
- Interlocked.cs
- SecurityException.cs
- SymbolMethod.cs
- TraceContext.cs
- ClientFormsIdentity.cs
- DefaultClaimSet.cs
- TypeHelpers.cs
- AddInToken.cs
- ApplicationServiceHelper.cs
- JsonSerializer.cs
- BitmapSourceSafeMILHandle.cs
- GroupBoxAutomationPeer.cs
- VariableAction.cs
- BeginStoryboard.cs
- UnsafeNativeMethods.cs
- StrongBox.cs
- ShapingEngine.cs
- AjaxFrameworkAssemblyAttribute.cs
- WebPermission.cs
- SuppressMessageAttribute.cs
- FormatStringEditor.cs
- InvalidDataException.cs
- MemoryStream.cs
- ParenthesizePropertyNameAttribute.cs
- _ConnectOverlappedAsyncResult.cs
- CreateParams.cs
- FileFormatException.cs
- TraversalRequest.cs
- LogEntryHeaderSerializer.cs
- StringResourceManager.cs
- DefaultAssemblyResolver.cs
- OdbcInfoMessageEvent.cs
- __TransparentProxy.cs
- ArcSegment.cs
- SplitterEvent.cs
- UnsafeNativeMethods.cs
- DataGridBoundColumn.cs
- ProgressBar.cs
- OperationAbortedException.cs
- OdbcCommand.cs
- SqlNotificationEventArgs.cs
- DriveInfo.cs