Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / TextBlockAutomationPeer.cs / 1305600 / 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
- ZeroOpNode.cs
- SoapHeaderException.cs
- RegisteredDisposeScript.cs
- PropertyRecord.cs
- TdsParameterSetter.cs
- DSACryptoServiceProvider.cs
- DeviceContext2.cs
- SyndicationElementExtension.cs
- FilterQuery.cs
- AuthorizationRule.cs
- ObjectDataSourceView.cs
- BoundsDrawingContextWalker.cs
- MessageSecurityProtocolFactory.cs
- CustomGrammar.cs
- WebDisplayNameAttribute.cs
- ScaleTransform3D.cs
- StrongNameIdentityPermission.cs
- ThaiBuddhistCalendar.cs
- Attributes.cs
- SQlBooleanStorage.cs
- SqlRecordBuffer.cs
- WebZoneDesigner.cs
- QuadTree.cs
- RoleManagerEventArgs.cs
- XmlExceptionHelper.cs
- CountdownEvent.cs
- ColumnTypeConverter.cs
- NavigateEvent.cs
- _UncName.cs
- DetailsView.cs
- ToolStripContentPanel.cs
- HttpBufferlessInputStream.cs
- MessageDecoder.cs
- RemoveStoryboard.cs
- XamlBrushSerializer.cs
- GradientSpreadMethodValidation.cs
- HtmlContainerControl.cs
- EntityContainer.cs
- OutputCacheSection.cs
- Operator.cs
- FontClient.cs
- ViewService.cs
- AbandonedMutexException.cs
- ClickablePoint.cs
- DictionaryGlobals.cs
- MobileControlDesigner.cs
- NegotiateStream.cs
- IRCollection.cs
- SafeThreadHandle.cs
- SqlPersonalizationProvider.cs
- RunClient.cs
- ClientBuildManagerCallback.cs
- ReadOnlyActivityGlyph.cs
- TextLineResult.cs
- SQLByteStorage.cs
- PageContentCollection.cs
- SpoolingTask.cs
- RangeBaseAutomationPeer.cs
- ColorTranslator.cs
- SafeRightsManagementSessionHandle.cs
- WebBrowserHelper.cs
- WebControlToolBoxItem.cs
- WorkflowInstanceExtensionCollection.cs
- TrackingParameters.cs
- LinkButton.cs
- DataGridViewImageColumn.cs
- Win32SafeHandles.cs
- StrokeNode.cs
- TemplateControlCodeDomTreeGenerator.cs
- DbConnectionPoolGroupProviderInfo.cs
- ProcessThreadCollection.cs
- SettingsBase.cs
- OdbcTransaction.cs
- ItemsChangedEventArgs.cs
- ContextProperty.cs
- Tracer.cs
- recordstatefactory.cs
- TypeLibraryHelper.cs
- CommandDesigner.cs
- WebReferenceOptions.cs
- ArcSegment.cs
- TogglePattern.cs
- SelectionWordBreaker.cs
- SettingsBase.cs
- DateTimeFormat.cs
- CookieProtection.cs
- MetadataUtil.cs
- SerialStream.cs
- Ops.cs
- UserNameSecurityTokenProvider.cs
- ParameterEditorUserControl.cs
- TextTreeTextElementNode.cs
- TraceSwitch.cs
- AlphabeticalEnumConverter.cs
- RootBrowserWindowAutomationPeer.cs
- BitmapScalingModeValidation.cs
- Globals.cs
- Errors.cs
- IndexedEnumerable.cs
- ContentControl.cs