Creating the ViewModel

I created new classes to mirror the relevant parts of the Visio Type Library objects, and all of the Validation API objects and collections. I prefixed these wrapper classes with VE for ValidationExplorer, which is the project name.

Creating the ViewModel

Note

When you select a folder in the Solution Explorer, then select Project, Add Class, and so on, Visual Studio will automatically append the folder name to the namespace of the class.

As the Visio objects are COM objects, you cannot bind to them directly because XAML really needs to bind to dependency objects that can notify the UI of any changes that take place.

Therefore, I created a BaseViewModel ...

Get Microsoft Visio 2010 Business Process Diagramming and Validation now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.