WPF and Silverlight are powerful frameworks for creating rich applications using XAML. Writing unit-testing applications with these frameworks can be difficult, but it is not something you should avoid. As with WCF and ASP.NET, it is important to have a firm testing strategy for your varied clients.
Instead of working around the limitations of the code-behind paradigm and trying to instantiate the tightly coupled classes, the MVVM pattern facilitates a true separation of the user interface and the code that controls it.
Not only does using MVVM allow you to unit-test your applications, but it also makes your applications more maintainable. It also helps the developer/designer relationship by allowing designers to work only in the XAML without having to worry about the code. Several great MVVM frameworks remove the burden of implementing this pattern, letting you focus on the process of writing great software.