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
- BufferedGraphicsManager.cs
- ToolStripManager.cs
- autovalidator.cs
- PageParser.cs
- RoleGroupCollection.cs
- EmbeddedMailObjectsCollection.cs
- ObjectCloneHelper.cs
- SetIndexBinder.cs
- ClientScriptItem.cs
- AdapterUtil.cs
- LowerCaseStringConverter.cs
- ClientUtils.cs
- LinqDataSourceContextEventArgs.cs
- TCPListener.cs
- BehaviorEditorPart.cs
- BitmapSizeOptions.cs
- AxParameterData.cs
- DoubleAverageAggregationOperator.cs
- RawKeyboardInputReport.cs
- ExceptionUtil.cs
- MappedMetaModel.cs
- JsonEncodingStreamWrapper.cs
- PrincipalPermission.cs
- ClaimSet.cs
- MemberDomainMap.cs
- EventHandlerList.cs
- SystemUdpStatistics.cs
- SmtpFailedRecipientException.cs
- LineMetrics.cs
- XmlQueryCardinality.cs
- ServicePoint.cs
- StylusPointProperty.cs
- AnonymousIdentificationSection.cs
- ToolStripArrowRenderEventArgs.cs
- _FtpDataStream.cs
- log.cs
- SinglePageViewer.cs
- EntityKeyElement.cs
- FacetValueContainer.cs
- EventEntry.cs
- BaseCAMarshaler.cs
- OperationDescription.cs
- Application.cs
- ValidationPropertyAttribute.cs
- CollaborationHelperFunctions.cs
- ReadingWritingEntityEventArgs.cs
- DbProviderFactory.cs
- SpoolingTask.cs
- TypeLibConverter.cs
- SlotInfo.cs
- XmlSchemaDocumentation.cs
- ThreadSafeList.cs
- WorkflowApplicationCompletedEventArgs.cs
- CompareValidator.cs
- DeadCharTextComposition.cs
- PeerReferralPolicy.cs
- BCLDebug.cs
- AutoScrollHelper.cs
- PenThreadPool.cs
- RSAPKCS1SignatureFormatter.cs
- SessionParameter.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- DbDataSourceEnumerator.cs
- ParserContext.cs
- CodeBlockBuilder.cs
- SetStoryboardSpeedRatio.cs
- ResXResourceReader.cs
- GestureRecognizer.cs
- IfAction.cs
- Site.cs
- Util.cs
- SecurityManager.cs
- EmulateRecognizeCompletedEventArgs.cs
- ViewDesigner.cs
- CompilationPass2TaskInternal.cs
- RoutedEventValueSerializer.cs
- XmlSerializationWriter.cs
- Pair.cs
- CallbackValidator.cs
- Vars.cs
- AnimationStorage.cs
- MetadataPropertyvalue.cs
- StandardMenuStripVerb.cs
- SchemaImporterExtensionsSection.cs
- ViewValidator.cs
- WebPartConnectionCollection.cs
- SoapMessage.cs
- EventTrigger.cs
- ADConnectionHelper.cs
- QueryPageSettingsEventArgs.cs
- ITextView.cs
- PersonalizationStateQuery.cs
- Literal.cs
- RSACryptoServiceProvider.cs
- OracleCommand.cs
- DocumentApplicationJournalEntry.cs
- StringHelper.cs
- ObjectNavigationPropertyMapping.cs
- SortDescription.cs
- MailHeaderInfo.cs