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
- BindingValueChangedEventArgs.cs
- AsymmetricKeyExchangeFormatter.cs
- JpegBitmapEncoder.cs
- MachinePropertyVariants.cs
- TextModifier.cs
- SQLInt64Storage.cs
- NamespaceList.cs
- HitTestFilterBehavior.cs
- ExpressionLexer.cs
- RangeBaseAutomationPeer.cs
- OleDbWrapper.cs
- WizardStepBase.cs
- StateWorkerRequest.cs
- DescendantBaseQuery.cs
- CodeSnippetCompileUnit.cs
- NativeStructs.cs
- HideDisabledControlAdapter.cs
- TreeNodeEventArgs.cs
- DbProviderConfigurationHandler.cs
- COM2IDispatchConverter.cs
- Overlapped.cs
- TerminateSequence.cs
- DataGridViewColumnCollection.cs
- SafeHandles.cs
- AuthenticatingEventArgs.cs
- X509Certificate.cs
- Image.cs
- UseManagedPresentationBindingElementImporter.cs
- SqlMultiplexer.cs
- CodeMemberMethod.cs
- Internal.cs
- PatternMatcher.cs
- BitmapMetadataEnumerator.cs
- XmlSyndicationContent.cs
- SystemUnicastIPAddressInformation.cs
- DoubleAnimation.cs
- HitTestResult.cs
- ValidatingReaderNodeData.cs
- AVElementHelper.cs
- VisualTreeFlattener.cs
- RequestCacheManager.cs
- XamlTypeMapper.cs
- InplaceBitmapMetadataWriter.cs
- ToolTip.cs
- VirtualPath.cs
- SvcMapFile.cs
- IriParsingElement.cs
- SqlDataReader.cs
- TextFormattingConverter.cs
- XmlReader.cs
- MulticastOption.cs
- FastEncoderWindow.cs
- SQLDoubleStorage.cs
- ApplicationTrust.cs
- ScrollViewer.cs
- CompositeFontFamily.cs
- DesignerProperties.cs
- DataListItem.cs
- CompiledRegexRunnerFactory.cs
- DataGridViewCellStyle.cs
- DataGridClipboardHelper.cs
- DebugHandleTracker.cs
- RevocationPoint.cs
- LineMetrics.cs
- MessageAction.cs
- SecureUICommand.cs
- TableLayoutSettingsTypeConverter.cs
- HttpException.cs
- CompositeScriptReferenceEventArgs.cs
- HtmlMeta.cs
- KernelTypeValidation.cs
- DBSchemaTable.cs
- ConvertBinder.cs
- HitTestParameters.cs
- ZoomPercentageConverter.cs
- MetadataItemCollectionFactory.cs
- TemplatedWizardStep.cs
- ToolboxItemFilterAttribute.cs
- EncoderBestFitFallback.cs
- ToolStripItemEventArgs.cs
- HttpInputStream.cs
- FillRuleValidation.cs
- DataGridViewCellStyle.cs
- ConstraintManager.cs
- CacheForPrimitiveTypes.cs
- TextEvent.cs
- DecimalAnimation.cs
- WindowsNonControl.cs
- NamespaceEmitter.cs
- HtmlSelect.cs
- mediaeventshelper.cs
- XD.cs
- SerializationSectionGroup.cs
- DesignerLoader.cs
- ToolStripItemRenderEventArgs.cs
- TemplatePropertyEntry.cs
- GradientBrush.cs
- HtmlInputRadioButton.cs
- Control.cs
- XPathDocument.cs