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
- TraceSection.cs
- DataTransferEventArgs.cs
- FileSystemInfo.cs
- PEFileReader.cs
- DataGridDetailsPresenter.cs
- ArrayHelper.cs
- XPathBinder.cs
- ACE.cs
- CngUIPolicy.cs
- NavigationEventArgs.cs
- SocketPermission.cs
- ServicePointManager.cs
- LookupNode.cs
- DbModificationCommandTree.cs
- CounterSampleCalculator.cs
- DataAccessException.cs
- Font.cs
- TextEffectResolver.cs
- CommandHelper.cs
- RectAnimationBase.cs
- UInt64Converter.cs
- NTAccount.cs
- CodeDirectoryCompiler.cs
- QueryConverter.cs
- PageHandlerFactory.cs
- ResXResourceSet.cs
- XmlTextAttribute.cs
- InvalidProgramException.cs
- AutomationAttributeInfo.cs
- SqlCrossApplyToCrossJoin.cs
- TemplatePagerField.cs
- infer.cs
- AdornerPresentationContext.cs
- DependencyPropertyValueSerializer.cs
- TraceSection.cs
- WindowsPen.cs
- BackStopAuthenticationModule.cs
- InstanceKeyCollisionException.cs
- WindowShowOrOpenTracker.cs
- PenContexts.cs
- basenumberconverter.cs
- SingleObjectCollection.cs
- StringResourceManager.cs
- FunctionParameter.cs
- PersistenceTypeAttribute.cs
- DescendantOverDescendantQuery.cs
- AddInServer.cs
- EventRouteFactory.cs
- FacetChecker.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- FormsAuthenticationEventArgs.cs
- RoutedEventHandlerInfo.cs
- LayoutDump.cs
- WebBaseEventKeyComparer.cs
- ToolTipService.cs
- ProjectionPruner.cs
- InvokeBase.cs
- PlaceHolder.cs
- EventManager.cs
- Cursor.cs
- NotCondition.cs
- ObfuscateAssemblyAttribute.cs
- UnmanagedHandle.cs
- validationstate.cs
- ClientConvert.cs
- IndexedGlyphRun.cs
- ImpersonateTokenRef.cs
- FileStream.cs
- WebPartEditorApplyVerb.cs
- MouseActionConverter.cs
- Color.cs
- XmlLanguageConverter.cs
- CachedTypeface.cs
- ItemsControl.cs
- WebPartsPersonalization.cs
- SwitchElementsCollection.cs
- StringValidator.cs
- ColumnMapProcessor.cs
- ObjectStorage.cs
- SelectionWordBreaker.cs
- DispatcherHookEventArgs.cs
- DataServiceCollectionOfT.cs
- TimeSpanStorage.cs
- RectAnimationUsingKeyFrames.cs
- ServerValidateEventArgs.cs
- XmlSchemaImporter.cs
- CngKeyCreationParameters.cs
- LOSFormatter.cs
- FontFamilyIdentifier.cs
- MediaSystem.cs
- RootBrowserWindowProxy.cs
- DataColumnMappingCollection.cs
- ImageMap.cs
- VirtualPathProvider.cs
- CodeVariableReferenceExpression.cs
- TokenBasedSet.cs
- AppDomainProtocolHandler.cs
- TaskFormBase.cs
- ConsoleEntryPoint.cs
- oledbconnectionstring.cs