Code:
/ 4.0 / 4.0 / 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.
//----------------------------------------------------------------------------
//
// 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
- DataColumnPropertyDescriptor.cs
- XamlToRtfParser.cs
- ArcSegment.cs
- SByteConverter.cs
- MenuItemCollection.cs
- TextSchema.cs
- SiteMapDataSource.cs
- DecimalStorage.cs
- WebZone.cs
- BinaryFormatter.cs
- PeekCompletedEventArgs.cs
- XmlValidatingReaderImpl.cs
- safelinkcollection.cs
- DrawingContextDrawingContextWalker.cs
- DynamicDocumentPaginator.cs
- XmlLinkedNode.cs
- Wizard.cs
- HashLookup.cs
- GeometryModel3D.cs
- TraceContext.cs
- DbInsertCommandTree.cs
- PassportAuthenticationModule.cs
- SystemColors.cs
- LinkLabel.cs
- PointAnimationUsingPath.cs
- TextEncodedRawTextWriter.cs
- CatalogZoneBase.cs
- ProcessingInstructionAction.cs
- PersonalizationState.cs
- FileSystemInfo.cs
- EncryptRequest.cs
- CachedPathData.cs
- Transform3D.cs
- HostProtectionException.cs
- CompilerTypeWithParams.cs
- FormsAuthenticationTicket.cs
- SuppressMergeCheckAttribute.cs
- UseLicense.cs
- ReadOnlyNameValueCollection.cs
- EditableLabelControl.cs
- DrawToolTipEventArgs.cs
- MergeFailedEvent.cs
- MexBindingElement.cs
- BehaviorEditorPart.cs
- CustomSignedXml.cs
- WebZone.cs
- WebPageTraceListener.cs
- PermissionSetTriple.cs
- StylusShape.cs
- InvalidPipelineStoreException.cs
- SystemWebSectionGroup.cs
- DataGridHeaderBorder.cs
- IdleTimeoutMonitor.cs
- ToolStripSeparatorRenderEventArgs.cs
- CodeAttributeArgumentCollection.cs
- RegexEditorDialog.cs
- LayoutTable.cs
- HtmlTableRowCollection.cs
- NamedPipeProcessProtocolHandler.cs
- AutomationEvent.cs
- StopStoryboard.cs
- MediaScriptCommandRoutedEventArgs.cs
- OleDbEnumerator.cs
- TableParagraph.cs
- DelegateSerializationHolder.cs
- Ref.cs
- WindowsAuthenticationModule.cs
- httpapplicationstate.cs
- TemplateManager.cs
- InputScope.cs
- RemotingServices.cs
- DNS.cs
- ErrorEventArgs.cs
- StorageEntityTypeMapping.cs
- COM2TypeInfoProcessor.cs
- EntryPointNotFoundException.cs
- HtmlWindow.cs
- EditorPart.cs
- SelectionBorderGlyph.cs
- AlignmentYValidation.cs
- HtmlHead.cs
- NullRuntimeConfig.cs
- SqlDelegatedTransaction.cs
- TablePattern.cs
- DbFunctionCommandTree.cs
- WebPartChrome.cs
- SignatureConfirmationElement.cs
- StylusPlugInCollection.cs
- BufferAllocator.cs
- FilterUserControlBase.cs
- BuildProvidersCompiler.cs
- PageContentAsyncResult.cs
- MimeXmlImporter.cs
- IgnorePropertiesAttribute.cs
- TypeSystem.cs
- EDesignUtil.cs
- DrawingImage.cs
- HtmlGenericControl.cs
- EarlyBoundInfo.cs
- AesCryptoServiceProvider.cs