Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / 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. //---------------------------------------------------------------------------- // // 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
- HttpListenerPrefixCollection.cs
- ChameleonKey.cs
- SerializationFieldInfo.cs
- CharEnumerator.cs
- ImageSourceConverter.cs
- ProcessMessagesAsyncResult.cs
- GPPOINT.cs
- XmlSchemaSet.cs
- TdsParserSessionPool.cs
- ExpanderAutomationPeer.cs
- regiisutil.cs
- HtmlControl.cs
- WindowsGraphicsCacheManager.cs
- WindowsStreamSecurityBindingElement.cs
- XdrBuilder.cs
- ExceptionRoutedEventArgs.cs
- PersonalizationStateInfoCollection.cs
- Cursor.cs
- QueryInterceptorAttribute.cs
- MissingSatelliteAssemblyException.cs
- RoleManagerEventArgs.cs
- ReadOnlyPropertyMetadata.cs
- RecognitionEventArgs.cs
- PagedControl.cs
- XmlSchemaValidator.cs
- ExpressionSelection.cs
- SrgsRuleRef.cs
- ImageField.cs
- BuildProvider.cs
- SqlDependencyUtils.cs
- X509Certificate.cs
- CodeCompileUnit.cs
- XmlSerializationWriter.cs
- AnnotationMap.cs
- DispatcherEventArgs.cs
- ThreadAbortException.cs
- DbConnectionHelper.cs
- ExplicitDiscriminatorMap.cs
- PassportAuthentication.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- ContentElement.cs
- COAUTHIDENTITY.cs
- SqlTopReducer.cs
- LOSFormatter.cs
- MsmqChannelFactoryBase.cs
- ServiceSecurityAuditBehavior.cs
- ContentElement.cs
- SlotInfo.cs
- UnaryOperationBinder.cs
- ApplicationTrust.cs
- FormViewRow.cs
- WebPartCatalogAddVerb.cs
- MultiSelectRootGridEntry.cs
- SchemaElementDecl.cs
- RadioButtonRenderer.cs
- GeneralTransformGroup.cs
- SafeIUnknown.cs
- AnimationLayer.cs
- DesignerCategoryAttribute.cs
- ScriptIgnoreAttribute.cs
- OracleBFile.cs
- MemberRelationshipService.cs
- XmlException.cs
- WpfKnownMemberInvoker.cs
- TreeIterators.cs
- Columns.cs
- ToolStripItemEventArgs.cs
- RuleAttributes.cs
- EncoderBestFitFallback.cs
- SerializationSectionGroup.cs
- CollectionBuilder.cs
- PlacementWorkspace.cs
- MetadataWorkspace.cs
- WorkflowInstanceTerminatedRecord.cs
- GenericUriParser.cs
- UnsafeNativeMethodsMilCoreApi.cs
- HeaderCollection.cs
- StreamAsIStream.cs
- EdmEntityTypeAttribute.cs
- WebPartManagerDesigner.cs
- CodeAccessPermission.cs
- SizeAnimation.cs
- NameSpaceEvent.cs
- Parser.cs
- TextPointer.cs
- DataGridViewDataErrorEventArgs.cs
- TableLayoutSettingsTypeConverter.cs
- shaperfactory.cs
- StreamingContext.cs
- TreePrinter.cs
- ServiceThrottlingElement.cs
- SafeNativeMethods.cs
- GACMembershipCondition.cs
- ContainerControl.cs
- _SSPISessionCache.cs
- UpdatePanelTriggerCollection.cs
- FontDifferentiator.cs
- Emitter.cs
- StringUtil.cs
- StylusShape.cs