Code:
/ 4.0 / 4.0 / untmp / 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.///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WindowsTab.cs
- UrlMappingsSection.cs
- HttpRequestCacheValidator.cs
- WebPartConnectionsConfigureVerb.cs
- PerformanceCountersElement.cs
- ServiceParser.cs
- GACMembershipCondition.cs
- PeerContact.cs
- IIS7UserPrincipal.cs
- XamlTypeMapperSchemaContext.cs
- FastPropertyAccessor.cs
- ProgressChangedEventArgs.cs
- SendingRequestEventArgs.cs
- DetectEofStream.cs
- AccessorTable.cs
- HWStack.cs
- NameNode.cs
- DataReceivedEventArgs.cs
- PersonalizationProvider.cs
- CheckBoxFlatAdapter.cs
- XmlIgnoreAttribute.cs
- TextRangeEdit.cs
- RequestResizeEvent.cs
- HtmlWindow.cs
- OutgoingWebResponseContext.cs
- WebPartConnectVerb.cs
- QueryCacheEntry.cs
- BuildProvider.cs
- EventHandlerList.cs
- HttpHandlerAction.cs
- DesignerLinkAdapter.cs
- SchemaAttDef.cs
- MailSettingsSection.cs
- WindowsSlider.cs
- SubpageParagraph.cs
- DesignerVerbCollection.cs
- SymbolPair.cs
- FlowPanelDesigner.cs
- ImmComposition.cs
- ElementsClipboardData.cs
- XPathSelectionIterator.cs
- DependencyPropertyConverter.cs
- StrokeSerializer.cs
- TemplateParser.cs
- Context.cs
- UIPermission.cs
- SecurityAttributeGenerationHelper.cs
- UiaCoreProviderApi.cs
- RadioButton.cs
- WCFServiceClientProxyGenerator.cs
- ConfigurationSectionCollection.cs
- ReadWriteSpinLock.cs
- FormsAuthenticationTicket.cs
- AssemblyAssociatedContentFileAttribute.cs
- BufferBuilder.cs
- WSIdentityFaultException.cs
- SqlAliaser.cs
- ProfileManager.cs
- TableRow.cs
- FixedSOMLineCollection.cs
- DateRangeEvent.cs
- WindowsFormsSectionHandler.cs
- FormatterServices.cs
- Vector3D.cs
- BitmapCodecInfo.cs
- InkCanvasAutomationPeer.cs
- HttpCacheVaryByContentEncodings.cs
- FormCollection.cs
- VersionedStream.cs
- ProfileWorkflowElement.cs
- EntityKeyElement.cs
- StrokeCollectionConverter.cs
- IndicCharClassifier.cs
- ColumnResizeUndoUnit.cs
- BaseCodePageEncoding.cs
- GenericIdentity.cs
- PeerResolverSettings.cs
- UnionExpr.cs
- ConstraintCollection.cs
- ControlValuePropertyAttribute.cs
- NumberFunctions.cs
- StringDictionary.cs
- ScriptResourceInfo.cs
- ComEventsInfo.cs
- EntityProviderFactory.cs
- PolyBezierSegment.cs
- XNameTypeConverter.cs
- EventProxy.cs
- MutableAssemblyCacheEntry.cs
- Knowncolors.cs
- HostingEnvironment.cs
- FontInfo.cs
- SchemaManager.cs
- SvcMapFileSerializer.cs
- CompilerErrorCollection.cs
- SchemaSetCompiler.cs
- XmlCDATASection.cs
- HttpConfigurationSystem.cs
- DataRowCollection.cs
- SecurityPolicySection.cs