DocumentAutomationPeer Class
Exposes Document control types to UI Automation.
Assembly: PresentationFramework (in PresentationFramework.dll)
The DocumentAutomationPeer represents documents and supports the TextPattern. Objects such as a FixedDocument or FlowDocument can contain embedded objects, such as images and hyperlinks. Initially, when you try to get the child elements of the document, DocumentAutomationPeer.GetChildrenCore does not return the embedded objects. To get the embedded elements, obtain a TextPatternRange from the TextPattern and call TextPatternRange.GetChildren. After TextPatternRange.GetChildren is called, any elements in that TextPatternRange are returned by DocumentAutomationPeer.GetChildrenCore.
Note: |
|---|
Unless you know the document is a FlowDocument, you should not call GetChildren on the TextPattern.DocumentRange property. If the document is loaded from a network location, calling GetChildren on the entire document is resource intensive. Instead, you should use one of the methods on TextPattern that returns a TextPatternRange that represents a portion of the document. |
System.Windows.Threading.DispatcherObject
System.Windows.Automation.Peers.AutomationPeer
System.Windows.Automation.Peers.ContentElementAutomationPeer
System.Windows.Automation.Peers.FrameworkContentElementAutomationPeer
System.Windows.Automation.Peers.ContentTextAutomationPeer
System.Windows.Automation.Peers.DocumentAutomationPeer
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note: