Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- WmlMobileTextWriter.cs
- UntypedNullExpression.cs
- ConversionHelper.cs
- EmissiveMaterial.cs
- XamlReader.cs
- ImageCodecInfo.cs
- SystemIcmpV4Statistics.cs
- LocalizableResourceBuilder.cs
- MimeParameters.cs
- PhonemeEventArgs.cs
- BitmapVisualManager.cs
- Expressions.cs
- ContentControl.cs
- XmlNamespaceMappingCollection.cs
- MarkupWriter.cs
- Point3DAnimationUsingKeyFrames.cs
- BypassElementCollection.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- ObfuscateAssemblyAttribute.cs
- NewItemsContextMenuStrip.cs
- HttpWebRequest.cs
- MimeParameterWriter.cs
- VectorValueSerializer.cs
- PopupEventArgs.cs
- HttpValueCollection.cs
- ConnectionPointCookie.cs
- InvalidOperationException.cs
- UnsafeNetInfoNativeMethods.cs
- HtmlWindowCollection.cs
- Ray3DHitTestResult.cs
- GenericTypeParameterBuilder.cs
- ExtentCqlBlock.cs
- DataGridItemEventArgs.cs
- EventMappingSettings.cs
- FtpWebResponse.cs
- RelatedCurrencyManager.cs
- RuntimeArgumentHandle.cs
- EventSchemaTraceListener.cs
- PropertyInformationCollection.cs
- DataConnectionHelper.cs
- FacetDescriptionElement.cs
- coordinatorscratchpad.cs
- XmlValueConverter.cs
- Invariant.cs
- MetadataArtifactLoaderResource.cs
- NodeFunctions.cs
- ByteConverter.cs
- ServiceModelConfigurationSection.cs
- DesignerActionHeaderItem.cs
- PathStreamGeometryContext.cs
- _Semaphore.cs
- ComponentResourceKeyConverter.cs
- ReadOnlyMetadataCollection.cs
- Control.cs
- HtmlTableCell.cs
- MouseButton.cs
- SoapAttributeOverrides.cs
- ExtendedPropertyCollection.cs
- CounterSet.cs
- WebRequestModuleElementCollection.cs
- ExportOptions.cs
- AppDomainGrammarProxy.cs
- UIntPtr.cs
- StorageSetMapping.cs
- SqlCaseSimplifier.cs
- PointAnimationUsingPath.cs
- UInt16Converter.cs
- StandardOleMarshalObject.cs
- Configuration.cs
- Solver.cs
- IntranetCredentialPolicy.cs
- HyperLinkColumn.cs
- ChannelCredentials.cs
- FlowDocumentView.cs
- Part.cs
- ToolBarPanel.cs
- ToolStripItem.cs
- TypeConvertions.cs
- TableCell.cs
- ImportOptions.cs
- ProviderMetadataCachedInformation.cs
- LinearGradientBrush.cs
- BamlRecordHelper.cs
- _SSPISessionCache.cs
- ObfuscationAttribute.cs
- DelegateTypeInfo.cs
- FileIOPermission.cs
- SystemResourceKey.cs
- XmlTextReaderImplHelpers.cs
- ContextMenu.cs
- EditCommandColumn.cs
- ConstructorArgumentAttribute.cs
- LocatorManager.cs
- RankException.cs
- ContextConfiguration.cs
- Transform.cs
- Point3DCollectionValueSerializer.cs
- FillRuleValidation.cs
- InkSerializer.cs
- basecomparevalidator.cs