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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access