Using MVVM adapters
Using this approach, we will create an MVVM adapter around the non-MVVM control.
Note
The adapter pattern is a Gang of Four [GOF] pattern that involves adding a layer of abstraction over a class to change its interface. There are two approaches that can be taken when implementing the adapter pattern—inheritance based or aggregation based. In the inheritance version, you simply create a subclass of the class that needs to be adapted and then expose a new interface while the aggregation version involves aggregating the class and then making pass through calls from the adapter to the adaptee as needed.
We have to make a decision about whether we should implement an aggregation adapter or an inheritance adapter. Here, we can implement an aggregation-based adapter. This obviously needs more work than their inheritance counterparts for pass-through calls to the aggregated object. However, it's common to find that third-party libraries' types are sealed
for inheritance (like WebBrowser...