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
- Semaphore.cs
- DateTimeParse.cs
- Cursor.cs
- DataObjectAttribute.cs
- HttpListenerPrefixCollection.cs
- ContextQuery.cs
- ObjectConverter.cs
- ParameterBuilder.cs
- ProfileProvider.cs
- DrawingBrush.cs
- ISessionStateStore.cs
- Win32SafeHandles.cs
- XmlSerializerFactory.cs
- ButtonChrome.cs
- TogglePatternIdentifiers.cs
- XamlWrapperReaders.cs
- ColumnTypeConverter.cs
- RegisteredHiddenField.cs
- SqlBinder.cs
- BinarySerializer.cs
- BinaryParser.cs
- CustomTypeDescriptor.cs
- CorrelationToken.cs
- PowerModeChangedEventArgs.cs
- Lease.cs
- FilterQuery.cs
- RecognizerInfo.cs
- Activity.cs
- DomainLiteralReader.cs
- ConditionCollection.cs
- ComPlusInstanceProvider.cs
- ReliableMessagingHelpers.cs
- CommentAction.cs
- GridViewUpdateEventArgs.cs
- StringComparer.cs
- XmlPropertyBag.cs
- Internal.cs
- TextLineResult.cs
- SiteMapProvider.cs
- XmlSchemaAppInfo.cs
- KnownTypesHelper.cs
- FixedTextContainer.cs
- DesignerForm.cs
- serverconfig.cs
- CorrelationToken.cs
- PopupControlService.cs
- UserMapPath.cs
- ListItem.cs
- ProcessHost.cs
- ZoneIdentityPermission.cs
- ToolStripDropDownMenu.cs
- StylusPointProperties.cs
- Process.cs
- SpecialNameAttribute.cs
- DocComment.cs
- JournalEntry.cs
- Label.cs
- FullTextState.cs
- GridLengthConverter.cs
- EntityContainerRelationshipSetEnd.cs
- EastAsianLunisolarCalendar.cs
- designeractionbehavior.cs
- SafeProcessHandle.cs
- TimeZone.cs
- DataSvcMapFileSerializer.cs
- UpDownBase.cs
- CodeSubDirectory.cs
- SchemaNames.cs
- ErrorsHelper.cs
- Color.cs
- Point3D.cs
- DeviceContext.cs
- HostingEnvironment.cs
- MouseEvent.cs
- HttpCapabilitiesSectionHandler.cs
- BmpBitmapEncoder.cs
- ManagementQuery.cs
- PropertyChangedEventArgs.cs
- GridViewUpdateEventArgs.cs
- CustomAttribute.cs
- SerializationStore.cs
- KernelTypeValidation.cs
- TypeBuilderInstantiation.cs
- CompositeFontParser.cs
- ScopelessEnumAttribute.cs
- PointLight.cs
- ActivityExecutionContextCollection.cs
- UndoEngine.cs
- OleDbError.cs
- AutoGeneratedFieldProperties.cs
- Enum.cs
- PaintValueEventArgs.cs
- Misc.cs
- PenContext.cs
- FixedTextView.cs
- SmiSettersStream.cs
- UnmanagedHandle.cs
- RuntimeHandles.cs
- HtmlEncodedRawTextWriter.cs
- UpdateExpressionVisitor.cs