views:

30

answers:

1

I am implementing WPF Application and i want to use System.Windows.Automation Namespace to capture highlgihted text from applications.

The Problem is that Visual Studio and Expression don't identfy AutomationElement, TreeScope, TextPattern and Red underlined it !! i am using Visual Studio 2010 Professional and Expression 4 on Windows 7. Thanks in advance :)

+1  A: 

You need to add UIAutomationClient.dll and it's dependencies as references. Even though the namespace is visable, not all of the classes are in the same Assembly.

Benjamin Anderson
Thanks man it works but TextPatternRange still not :)
Sam
It's in the UIAutomationClient Assembly, but it's in the System.Windows.Automation.Text namespace. Do you have the right namespace for it?
Benjamin Anderson
sorry i missed to include System.Windows.Automation.Text namespaceThanks man (Y)
Sam