Getting text from AvalonEdit with UIAutomation <p>I'm doing some work with UIAutomation and need to get the content of an AvalonEdit control in WPF. I am only able to get hold of the AvalonEdit control as a ControlType of Text:</p> <pre><code>var editors = app.FindAll(TreeScope.Descendants, new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Text)); </code></pre> <p>This is not supported...</p> <pre><code>var targetTextPattern = editor[0].GetCurrentPattern( TextPattern.Pattern) as TextPattern; </code></pre> <p>I can't seem to find a way to extract the text content from this, is it not possible to do when using ControlType.Text? I have also tried using ControlType Edit &amp; Document but AvalonEdit doesn't seem to support them.</p> <p>Any help is appretiated. Thanks!</p>