Creating the Rules Explorer window
The Rules Explorer Window is a Visio anchor window, for which there are many examples available, including some in the Microsoft Visio SDK. The resultant window is a sub-window of the document window, just like a number of other built-in windows like the Drawing Explorer, Shape Data window, and of course, the new Issues window. These windows can float free, anchored to an edge of the drawing window, or merged with other sub-windows.
The following screenshot of Visual Studio shows that the FormExplorer
class merely acts as a host for the UserControlExplorer
control.
The UserControlExplorer
is the WPF control that contains all of the goodies, and contains some code behind.
The Document Outline shows that very little is defined directly within the TreeViewMain
element because it calls on templates defined in the Resources.
Self-describing tree views
I wanted the tree view to display the open documents, their rule sets, and the rules within them. This is...