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
- ToolBarButtonClickEvent.cs
- ConfigPathUtility.cs
- SoapSchemaMember.cs
- Transform.cs
- DataSourceView.cs
- FormViewPagerRow.cs
- Native.cs
- HtmlHead.cs
- KeyValueSerializer.cs
- CharAnimationUsingKeyFrames.cs
- CompiledQuery.cs
- IntellisenseTextBox.cs
- GridItemCollection.cs
- SimpleTextLine.cs
- _CommandStream.cs
- WindowsScroll.cs
- AppSecurityManager.cs
- MultiDataTrigger.cs
- DoubleStorage.cs
- UriScheme.cs
- DebugInfoGenerator.cs
- ClientApiGenerator.cs
- ExpressionWriter.cs
- ExpressionBuilderCollection.cs
- Viewport3DAutomationPeer.cs
- SymbolMethod.cs
- Brush.cs
- RegionIterator.cs
- WorkflowExecutor.cs
- WebPartTransformer.cs
- AuthenticationModuleElement.cs
- SafeProcessHandle.cs
- PropertyReferenceExtension.cs
- BoolExpressionVisitors.cs
- EntityKeyElement.cs
- XPathItem.cs
- ServiceNameElement.cs
- BitmapEffectGroup.cs
- SerializationException.cs
- XhtmlMobileTextWriter.cs
- MethodBuilderInstantiation.cs
- Pair.cs
- FormClosedEvent.cs
- SettingsAttributeDictionary.cs
- BuildManagerHost.cs
- HttpFileCollection.cs
- ReadOnlyDataSourceView.cs
- EventLogPermissionHolder.cs
- PersonalizationDictionary.cs
- SafeFileMapViewHandle.cs
- DataGridViewCellPaintingEventArgs.cs
- TypedDatasetGenerator.cs
- CharUnicodeInfo.cs
- OperatorExpressions.cs
- Vector3DAnimationUsingKeyFrames.cs
- SystemIPv6InterfaceProperties.cs
- BatchParser.cs
- SoapRpcServiceAttribute.cs
- httpserverutility.cs
- CharAnimationBase.cs
- ISCIIEncoding.cs
- ScrollableControlDesigner.cs
- EntityDesignPluralizationHandler.cs
- ExpressionBindings.cs
- wpf-etw.cs
- LingerOption.cs
- MsmqBindingElementBase.cs
- ApplicationCommands.cs
- ToolStripDropDownItem.cs
- HttpServerVarsCollection.cs
- ColumnMapCopier.cs
- GridPatternIdentifiers.cs
- FactoryRecord.cs
- DiscoveryReference.cs
- StrictModeSecurityHeaderElementInferenceEngine.cs
- AspProxy.cs
- ChannelManagerHelpers.cs
- SystemIPGlobalProperties.cs
- StateMachine.cs
- XmlSchemaRedefine.cs
- StreamWithDictionary.cs
- StylusCaptureWithinProperty.cs
- DetailsViewUpdatedEventArgs.cs
- DynamicDocumentPaginator.cs
- Animatable.cs
- BamlLocalizableResource.cs
- ImageClickEventArgs.cs
- ACL.cs
- TreeViewHitTestInfo.cs
- TableLayoutSettings.cs
- CompositeDataBoundControl.cs
- MediaContextNotificationWindow.cs
- SubpageParagraph.cs
- OciHandle.cs
- DesignerActionTextItem.cs
- ListViewTableRow.cs
- CleanUpVirtualizedItemEventArgs.cs
- ZipIOCentralDirectoryFileHeader.cs
- AddDataControlFieldDialog.cs
- WindowsGraphicsCacheManager.cs