Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / ContentTextAutomationPeer.cs / 1305600 / ContentTextAutomationPeer.cs
//----------------------------------------------------------------------------
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
// File: ContentTextElementAutomationPeer.cs
//
// Description: Base class for AutomationPeers associated with TextPattern.
//
//---------------------------------------------------------------------------
using System.Collections.Generic; // List
using System.Windows.Automation.Provider; // IRawElementProviderSimple
using System.Windows.Documents; // ITextPointer
namespace System.Windows.Automation.Peers
{
///
/// Base class for AutomationPeers associated with TextPattern.
///
public abstract class ContentTextAutomationPeer : FrameworkContentElementAutomationPeer
{
///
/// Constructor.
///
protected ContentTextAutomationPeer(FrameworkContentElement owner)
: base(owner)
{ }
///
/// Maps AutomationPeer to provider object.
///
internal new IRawElementProviderSimple ProviderFromPeer(AutomationPeer peer)
{
return base.ProviderFromPeer(peer);
}
///
/// Maps automation provider to DependencyObject.
///
internal DependencyObject ElementFromProvider(IRawElementProviderSimple provider)
{
DependencyObject element = null;
AutomationPeer peer = PeerFromProvider(provider);
if (peer is UIElementAutomationPeer)
{
element = ((UIElementAutomationPeer)peer).Owner;
}
else if (peer is ContentElementAutomationPeer)
{
element = ((ContentElementAutomationPeer)peer).Owner;
}
return element;
}
///
/// Gets collection of AutomationPeers for given text range.
///
internal abstract List GetAutomationPeersFromRange(ITextPointer start, ITextPointer end);
}
}
// 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
- NamespaceTable.cs
- FolderBrowserDialog.cs
- MemberInitExpression.cs
- FilterQuery.cs
- ToolStripItem.cs
- PairComparer.cs
- DataObjectPastingEventArgs.cs
- AuthenticatingEventArgs.cs
- DesignTimeTemplateParser.cs
- hresults.cs
- AliasGenerator.cs
- JavaScriptSerializer.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- TableItemProviderWrapper.cs
- ConfigurationValue.cs
- SafeNativeMethods.cs
- TextEditorThreadLocalStore.cs
- UDPClient.cs
- RepeaterItemCollection.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- DATA_BLOB.cs
- ContainerCodeDomSerializer.cs
- TrackingCondition.cs
- Error.cs
- DrawingContextDrawingContextWalker.cs
- ToolStripGrip.cs
- Token.cs
- Graph.cs
- ListSortDescription.cs
- SmiRecordBuffer.cs
- DataConnectionHelper.cs
- Win32Native.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- BoolExpression.cs
- XPathScanner.cs
- HttpListenerContext.cs
- DataReaderContainer.cs
- MappedMetaModel.cs
- CustomPopupPlacement.cs
- SQLInt16.cs
- FontInfo.cs
- DataGridHeaderBorder.cs
- AuthStoreRoleProvider.cs
- Completion.cs
- ErrorWrapper.cs
- DesignSurface.cs
- ButtonBaseAutomationPeer.cs
- PageAsyncTaskManager.cs
- SystemIPGlobalStatistics.cs
- WinEventWrap.cs
- MessageBuilder.cs
- SchemaImporterExtensionElementCollection.cs
- ProfileService.cs
- Matrix.cs
- DataListCommandEventArgs.cs
- OneOfElement.cs
- ComboBoxAutomationPeer.cs
- XmlEncodedRawTextWriter.cs
- AssociationSet.cs
- ProtectedConfigurationProviderCollection.cs
- ADConnectionHelper.cs
- PresentationTraceSources.cs
- NavigationWindowAutomationPeer.cs
- NamespaceDisplayAutomationPeer.cs
- CodeGroup.cs
- DataGridItemCollection.cs
- TypeExtensions.cs
- BitmapEffectInput.cs
- AddToCollection.cs
- DynamicRendererThreadManager.cs
- StaticResourceExtension.cs
- ElementMarkupObject.cs
- AutoResizedEvent.cs
- DuplicateWaitObjectException.cs
- OrderByQueryOptionExpression.cs
- GrammarBuilderDictation.cs
- PropertyInformation.cs
- ServiceModelEnumValidator.cs
- WebSysDefaultValueAttribute.cs
- TextFragmentEngine.cs
- StickyNoteContentControl.cs
- IRCollection.cs
- TableItemPattern.cs
- SessionChannels.cs
- Style.cs
- BindingExpressionBase.cs
- HtmlHead.cs
- SqlConnectionPoolProviderInfo.cs
- HwndSource.cs
- SafeNativeMethods.cs
- SchemaContext.cs
- DefaultProxySection.cs
- Missing.cs
- _SslStream.cs
- HtmlInputImage.cs
- XPathNavigator.cs
- PassportAuthenticationModule.cs
- PatternMatcher.cs
- SqlUdtInfo.cs
- SocketInformation.cs