2010-08-16 118 views
2

我正在实现WPF应用程序,我想使用System.Windows.Automation命名空间从应用程序中捕获高位文本。System.Windows.Automation命名空间问题

问题是Visual Studio和Expression不识别AutomationElement,TreeScope,TextPattern和Red强调它!我在Windows 7上使用Visual Studio 2010 Professional和Expression 4.在此先感谢:)

回答

3

您需要添加UIAutomationClient.dll及其依赖关系作为参考。尽管名称空间是可见的,但并不是所有的类都在同一个Assembly中。

+0

感谢他的工作,但TextPatternRange仍然没有:) – 2010-08-16 21:08:55

+0

它在UIAutomationClient程序集中,但它在System.Windows.Automation.Text命名空间中。你有正确的命名空间吗? – 2010-08-16 21:12:28

+0

对不起,我错过了包括System.Windows.Automation.Text命名空间 谢谢你(Y) – 2010-08-16 21:13:48