Chapter 10. Using Non-MVVM Third-party Controls
By Muhammad Shujaat Siddiqi
The development community has been slow in adopting MVVM and as a result there are many third-party libraries and controls on the market that don't follow the pattern. One of the most common challenges faced when adopting MVVM is how to use non-MVVM libraries and controls in MVVM architecture. The good news is that we will review several techniques which will allow you to minimize the impact of the non-MVVM code in your design and maximize the testability of your codebase.
As an example, we are going to use the WPF WebBrowser control. This is complex enough example to explain all the different available techniques and yet simple enough to be covered in a single chapter. The WebBrowser
control is just a WPF wrapper around same old WebBrowser
ActiveX control from the Win32/MFC days. Like many Silverlight and WPF controls on the market, the WebBroswer
control wasn't built using the MVVM approach and instead has forms...