Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- FixedDocumentPaginator.cs
- StateMachineSubscription.cs
- MemoryMappedFileSecurity.cs
- CollectionViewGroupInternal.cs
- SecureEnvironment.cs
- ScriptServiceAttribute.cs
- XmlSerializer.cs
- AdPostCacheSubstitution.cs
- CacheMode.cs
- DataViewSettingCollection.cs
- ShortcutKeysEditor.cs
- ModelPerspective.cs
- ScrollProperties.cs
- SchemaImporter.cs
- ProfileEventArgs.cs
- SharedDp.cs
- CompositeActivityTypeDescriptorProvider.cs
- UriTemplateTrieLocation.cs
- DataServiceStreamResponse.cs
- HttpProtocolImporter.cs
- DragEventArgs.cs
- Constant.cs
- FixedSOMSemanticBox.cs
- DockProviderWrapper.cs
- KeysConverter.cs
- TraceHandlerErrorFormatter.cs
- Int32Rect.cs
- SelectionEditor.cs
- GridItem.cs
- SyndicationContent.cs
- DataGridRowAutomationPeer.cs
- WindowsSysHeader.cs
- NamespaceEmitter.cs
- mda.cs
- xsdvalidator.cs
- XhtmlBasicValidationSummaryAdapter.cs
- ObjectDataProvider.cs
- InstancePersistenceCommandException.cs
- PropertyTabAttribute.cs
- WorkflowDesignerColors.cs
- Transform3DGroup.cs
- WpfSharedBamlSchemaContext.cs
- BaseParagraph.cs
- SqlDataSource.cs
- MobileResource.cs
- BamlTreeMap.cs
- CompositeDuplexBindingElement.cs
- CommandField.cs
- WizardStepBase.cs
- ConfigurationManagerInternalFactory.cs
- RefreshPropertiesAttribute.cs
- FixUp.cs
- WebRequestModuleElementCollection.cs
- RequestContextBase.cs
- NavigationPropertyEmitter.cs
- CompensationParticipant.cs
- NavigationProgressEventArgs.cs
- ClipboardProcessor.cs
- MenuBase.cs
- SecurityChannelFaultConverter.cs
- DtcInterfaces.cs
- ReferencedCollectionType.cs
- Animatable.cs
- ByteStreamGeometryContext.cs
- SafeCryptHandles.cs
- AttributeConverter.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- jithelpers.cs
- SID.cs
- DataContractSerializer.cs
- StorageEntityContainerMapping.cs
- DuplexChannel.cs
- SoapExtensionStream.cs
- Publisher.cs
- FieldBuilder.cs
- Button.cs
- _SingleItemRequestCache.cs
- UserNameSecurityTokenAuthenticator.cs
- UnmanagedMemoryStreamWrapper.cs
- Directory.cs
- XmlILConstructAnalyzer.cs
- CodeDOMProvider.cs
- VarRemapper.cs
- ITreeGenerator.cs
- BitStream.cs
- SqlNotificationRequest.cs
- GridViewHeaderRowPresenter.cs
- BrushMappingModeValidation.cs
- DesignerView.cs
- HtmlObjectListAdapter.cs
- QilLiteral.cs
- IntermediatePolicyValidator.cs
- OleTxTransactionInfo.cs
- DateTimeFormat.cs
- ColumnMapProcessor.cs
- IntSecurity.cs
- MimePart.cs
- TypeValidationEventArgs.cs
- WorkflowRuntimeService.cs
- MetadataFile.cs