title: Avoid switching focus while using UI Automation
body: <p>Just out of curiosity I decided to write a simple tool with the functionality similar to <a href="http://msdn.microsoft.com/en-us/library/ms727247.aspx" rel="nofollow">UI Spy</a>. Basically it displays a tree of controls and allows seeing each control's property. Now I've started implementing patterns interaction and ran into the following issue: as soon as user clicks for example 'InvokePatter.Invoke' in my application UI automation switches focus to the application I'm targeting. The same happens for other patterns. And it also behaves in the same way in the original UI Spy application.</p>
  
  <p>This behavior makes impossible manipulating menus with my application because as I soon I click again on my application the tested application loses focus and menu is being closed. What I'd like to do is interacting with the application using UI automation but keeping my (UI Spy) application focused. Any ideas how to achieve it? Or at least how to achieve desired functionality - allow users interacting with menus?</p>