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
- ReflectTypeDescriptionProvider.cs
- ExternalCalls.cs
- DataGridViewCellLinkedList.cs
- SystemFonts.cs
- XmlCodeExporter.cs
- StringStorage.cs
- SequenceFullException.cs
- ObservableDictionary.cs
- HighlightVisual.cs
- DuplicateContext.cs
- ParserHooks.cs
- FormViewPageEventArgs.cs
- Condition.cs
- Source.cs
- InteropAutomationProvider.cs
- WaitingCursor.cs
- TreeNodeCollection.cs
- WrappedOptions.cs
- XamlTemplateSerializer.cs
- EnumerableRowCollection.cs
- ResourcePart.cs
- DataGridViewComboBoxColumn.cs
- ReliableOutputConnection.cs
- ProbeMatchesCD1.cs
- MessageQueueTransaction.cs
- DesignerDataParameter.cs
- RepeaterItem.cs
- BaseCodeDomTreeGenerator.cs
- MetadataElement.cs
- CompositionDesigner.cs
- NumericExpr.cs
- ProcessHost.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- BitmapEffectInput.cs
- ClaimTypes.cs
- Resources.Designer.cs
- ReadOnlyNameValueCollection.cs
- SynchronizationContext.cs
- OleDbDataReader.cs
- ImportContext.cs
- MetadataCollection.cs
- OleTxTransactionInfo.cs
- DataRowIndexBuffer.cs
- GridItemCollection.cs
- PluralizationService.cs
- HWStack.cs
- BrowserCapabilitiesCompiler.cs
- Utility.cs
- CanonicalXml.cs
- MobileTextWriter.cs
- ArgIterator.cs
- RegexInterpreter.cs
- TextBox.cs
- CompressionTransform.cs
- DataGridViewSelectedCellCollection.cs
- FontFamily.cs
- TextTreeRootNode.cs
- ArrayTypeMismatchException.cs
- OdbcErrorCollection.cs
- X509CertificateInitiatorServiceCredential.cs
- DataTableClearEvent.cs
- MultipleViewPattern.cs
- LocalizedNameDescriptionPair.cs
- DataTableMapping.cs
- FileIOPermission.cs
- PinnedBufferMemoryStream.cs
- DataView.cs
- SystemThemeKey.cs
- DesignerDataStoredProcedure.cs
- IsolatedStorageFilePermission.cs
- WebPartVerbCollection.cs
- ProfessionalColorTable.cs
- DodSequenceMerge.cs
- SHA1Managed.cs
- _HeaderInfo.cs
- PropertyPushdownHelper.cs
- _ConnectStream.cs
- ProbeDuplexCD1AsyncResult.cs
- DuplicateWaitObjectException.cs
- ListViewDeletedEventArgs.cs
- COM2ExtendedTypeConverter.cs
- HostingEnvironment.cs
- PlatformCulture.cs
- XmlSchemaRedefine.cs
- KnownBoxes.cs
- PropertyNames.cs
- Base64Encoder.cs
- counter.cs
- Expr.cs
- ZipIOExtraField.cs
- PasswordDeriveBytes.cs
- SqlDataSource.cs
- _SslStream.cs
- Shape.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- WebPartTransformerCollection.cs
- SynchronizedInputPattern.cs
- ResizingMessageFilter.cs
- WmlLinkAdapter.cs
- _TimerThread.cs