To test the .net UI, you will need to use the MVVM toolkit or create one so that you can customize your solution to test the methods used in the user interface. There are a number of frameworks for .net that support this can be found on Wikipedia .
The fundamentals that underlie all MVVM UI tests are the DI / IOC structure that you will also need to choose.
Essentially, you are creating a ViewModel class that you can verify. Unit Testing Example with WPF - http://www.markermetro.com/2010/07/technical/mvvm-light-and-unit-testing-example/
Now there are a few issues to think about. First, .NET WinForms will not have major changes with M $ (THANKS A BUNCH!), And XAML / WPF does not have an update path. MS $ indicated that developers should start using WPF interface designers to promote projects on the desktop. The number of MVVM frameworks that support WinForms is limited, so you may have to minimize your own through DI, but look at fooobar.com/questions/44510 / ... for a discussion of the topic.
Secondly, .NET Forms for WPF for Windows Phone for the web interface to solve problems with the Metro UI. The Microsoft P & P team was created. Prism for xaml / WPF has some anti-Injection Dependancy Injection patterns ( Service Locator - BAD ) according to Mark Seemann and its .NET Injection Dependency . Prism has not been upgraded to the subway and redesigned, confuses adoptive parents and makes it partially redundant. Essentially, I want to say that creating a framework that allows your application UI to move forward will be difficult.
source share