Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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.///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ListViewItemCollectionEditor.cs
- NumericExpr.cs
- Serializer.cs
- PeerToPeerException.cs
- Utils.cs
- TypeTypeConverter.cs
- TextFormatterImp.cs
- MetadataFile.cs
- OutputCacheSettingsSection.cs
- EventBookmark.cs
- PreservationFileWriter.cs
- OrderedDictionary.cs
- MethodAccessException.cs
- CreateSequenceResponse.cs
- SystemEvents.cs
- DirectionalLight.cs
- GenericPrincipal.cs
- MediaElementAutomationPeer.cs
- QueryOptionExpression.cs
- HashMembershipCondition.cs
- LineServicesRun.cs
- DataPager.cs
- OletxCommittableTransaction.cs
- WorkflowRuntimeBehavior.cs
- panel.cs
- DataPointer.cs
- DataSourceCacheDurationConverter.cs
- PackWebRequestFactory.cs
- _NetRes.cs
- CustomActivityDesigner.cs
- InvalidFilterCriteriaException.cs
- StylusPlugInCollection.cs
- WorkflowWebService.cs
- PointLightBase.cs
- GridViewRowEventArgs.cs
- SmtpTransport.cs
- PrinterUnitConvert.cs
- BitmapCodecInfo.cs
- ArraySortHelper.cs
- WebSysDescriptionAttribute.cs
- DecimalAnimationUsingKeyFrames.cs
- IdentityHolder.cs
- WebException.cs
- StandardBindingCollectionElement.cs
- WebPartExportVerb.cs
- MethodRental.cs
- Vector3DAnimationBase.cs
- DependencyProperty.cs
- CodeEventReferenceExpression.cs
- SharedStatics.cs
- ConstraintConverter.cs
- Mapping.cs
- SqlNotificationRequest.cs
- TdsValueSetter.cs
- BrushMappingModeValidation.cs
- FontFaceLayoutInfo.cs
- EFColumnProvider.cs
- TreeViewCancelEvent.cs
- SystemIPv6InterfaceProperties.cs
- HostedBindingBehavior.cs
- GenericAuthenticationEventArgs.cs
- NativeMethods.cs
- IntranetCredentialPolicy.cs
- ObjectStateManager.cs
- TextReader.cs
- ExceptionUtil.cs
- Rotation3DAnimationUsingKeyFrames.cs
- Rectangle.cs
- BindingCollectionElement.cs
- OutputScope.cs
- FontWeightConverter.cs
- DocumentPageView.cs
- StyleBamlRecordReader.cs
- URLIdentityPermission.cs
- SmtpMail.cs
- LinqDataSourceHelper.cs
- TypeInfo.cs
- FixUpCollection.cs
- StyleHelper.cs
- DataGridViewCellParsingEventArgs.cs
- ContainerControlDesigner.cs
- RegionIterator.cs
- IssuanceLicense.cs
- DefaultValueMapping.cs
- HttpCookiesSection.cs
- FixUpCollection.cs
- Crypto.cs
- CalendarDay.cs
- Span.cs
- ITreeGenerator.cs
- EnvironmentPermission.cs
- StringToken.cs
- webbrowsersite.cs
- PeerObject.cs
- TypeElementCollection.cs
- WorkflowOperationBehavior.cs
- RoleGroup.cs
- ExecutionContext.cs
- VirtualPathData.cs
- xmlglyphRunInfo.cs