Code:
/ 4.0 / 4.0 / untmp / 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.///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DbException.cs
- KoreanLunisolarCalendar.cs
- VisualTreeHelper.cs
- DataGridTextColumn.cs
- MonthChangedEventArgs.cs
- CompositionAdorner.cs
- CheckBoxBaseAdapter.cs
- Utils.cs
- DataGridViewAccessibleObject.cs
- CommandExpr.cs
- TableRowsCollectionEditor.cs
- RSAPKCS1SignatureDeformatter.cs
- CodeMemberEvent.cs
- OpCodes.cs
- TemplateBindingExtension.cs
- X509Logo.cs
- Config.cs
- SelectQueryOperator.cs
- FrameworkContextData.cs
- ThreadInterruptedException.cs
- BlockCollection.cs
- PartialList.cs
- DataControlButton.cs
- WebConfigurationHost.cs
- TableAutomationPeer.cs
- XmlnsDictionary.cs
- SByte.cs
- RTLAwareMessageBox.cs
- GridViewEditEventArgs.cs
- ListBoxItemAutomationPeer.cs
- BinaryQueryOperator.cs
- InputManager.cs
- Properties.cs
- PrimitiveSchema.cs
- UrlMappingsSection.cs
- TemplateBindingExpression.cs
- BitmapEffectDrawingContextWalker.cs
- _DomainName.cs
- SortDescriptionCollection.cs
- ConnectionStringSettingsCollection.cs
- Dynamic.cs
- AutomationElementCollection.cs
- IERequestCache.cs
- AutomationPropertyInfo.cs
- MessageSmuggler.cs
- NativeMethods.cs
- SqlClientWrapperSmiStreamChars.cs
- NetworkAddressChange.cs
- TreeViewItemAutomationPeer.cs
- JournalEntryStack.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- QilInvokeLateBound.cs
- TypefaceCollection.cs
- OptimalTextSource.cs
- AccessDataSource.cs
- FocusWithinProperty.cs
- FileDialogPermission.cs
- DataGridPageChangedEventArgs.cs
- CommandEventArgs.cs
- SrgsItemList.cs
- XmlAttributes.cs
- BinaryObjectWriter.cs
- DesignerCommandSet.cs
- ClrPerspective.cs
- AnnotationDocumentPaginator.cs
- C14NUtil.cs
- CollectionViewGroup.cs
- SoapWriter.cs
- KeyedHashAlgorithm.cs
- x509utils.cs
- MatrixTransform.cs
- DebugInfoGenerator.cs
- GroupBox.cs
- SerializationInfoEnumerator.cs
- InitializationEventAttribute.cs
- Parser.cs
- BindingMAnagerBase.cs
- _NegotiateClient.cs
- securitycriticaldata.cs
- PrivilegedConfigurationManager.cs
- DataViewSettingCollection.cs
- EntityCollectionChangedParams.cs
- XmlSchemaObjectTable.cs
- ScriptManagerProxy.cs
- XmlSchemaGroup.cs
- UIElement.cs
- UserPreferenceChangingEventArgs.cs
- TextEffect.cs
- LogWriteRestartAreaAsyncResult.cs
- CheckBoxFlatAdapter.cs
- IdentitySection.cs
- AnnotationObservableCollection.cs
- DataSvcMapFile.cs
- AuthenticationModulesSection.cs
- OrderByLifter.cs
- ComponentCommands.cs
- Converter.cs
- ExceptQueryOperator.cs
- FileLevelControlBuilderAttribute.cs
- PixelShader.cs