Creating the ViewModel class

We created new classes to mirror the relevant parts of the Visio Type Library objects, and all of the Validation API objects and collections. We prefixed these wrapper classes with VE for ValidationExplorer, which is the project name. The next screenshot shows the files in the ViewModel folder in the Solution window:

Creating the ViewModel class

Note

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

As the Visio objects are COM objects, you cannot bind directly to them successfully because XAML really needs to bind to dependency ...

Get Microsoft Visio 2013 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.