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
- ElementAction.cs
- TextBoxAutomationPeer.cs
- CalloutQueueItem.cs
- DrawingImage.cs
- ControlBuilderAttribute.cs
- HuffmanTree.cs
- ExtendedProperty.cs
- ConfigurationElement.cs
- Profiler.cs
- WmlTextViewAdapter.cs
- MutableAssemblyCacheEntry.cs
- MultitargetUtil.cs
- RangeValueProviderWrapper.cs
- TableRow.cs
- Socket.cs
- RenderContext.cs
- ColumnClickEvent.cs
- ModifierKeysConverter.cs
- CallbackException.cs
- RSACryptoServiceProvider.cs
- ScriptComponentDescriptor.cs
- XPathNode.cs
- ValueType.cs
- PkcsMisc.cs
- TaskResultSetter.cs
- WebPartDisplayModeEventArgs.cs
- OleDbReferenceCollection.cs
- PeerNearMe.cs
- WebReferencesBuildProvider.cs
- ApplicationServiceHelper.cs
- Int32CollectionConverter.cs
- AttachedPropertyDescriptor.cs
- ContentOperations.cs
- SourceInterpreter.cs
- RuntimeIdentifierPropertyAttribute.cs
- BamlRecords.cs
- WithParamAction.cs
- SQLDecimal.cs
- Size3D.cs
- AvTrace.cs
- RoleGroupCollection.cs
- ToolStripComboBox.cs
- CompositeCollection.cs
- TreeViewItem.cs
- ButtonDesigner.cs
- LinearGradientBrush.cs
- QuestionEventArgs.cs
- _SpnDictionary.cs
- RewritingValidator.cs
- HttpDebugHandler.cs
- XsltContext.cs
- DragCompletedEventArgs.cs
- HierarchicalDataBoundControl.cs
- XhtmlBasicSelectionListAdapter.cs
- ByteStream.cs
- ListBindableAttribute.cs
- ReflectionTypeLoadException.cs
- DbProviderManifest.cs
- RelationHandler.cs
- Events.cs
- XmlBinaryWriterSession.cs
- XmlTypeAttribute.cs
- safelink.cs
- SourceFileBuildProvider.cs
- TextFragmentEngine.cs
- ScalarConstant.cs
- SettingsAttributes.cs
- XmlDataSourceView.cs
- SecurityHeader.cs
- SplitContainer.cs
- InteropTrackingRecord.cs
- PackageProperties.cs
- EpmSourcePathSegment.cs
- TextEvent.cs
- SignedXml.cs
- CustomAttributeFormatException.cs
- TextParagraphCache.cs
- Region.cs
- ContentFilePart.cs
- ScriptModule.cs
- XmlSchemaComplexType.cs
- TypeSchema.cs
- MultiAsyncResult.cs
- RegexStringValidatorAttribute.cs
- SubMenuStyleCollection.cs
- CorrelationValidator.cs
- DataGridViewCellStyleConverter.cs
- StorageEndPropertyMapping.cs
- HandleCollector.cs
- DbParameterCollectionHelper.cs
- XmlSchemaAll.cs
- XhtmlCssHandler.cs
- BorderGapMaskConverter.cs
- TreeView.cs
- columnmapfactory.cs
- SiteMapSection.cs
- DataControlImageButton.cs
- MachineKey.cs
- RegexCode.cs
- ChannelManager.cs