You require a class when implementing a tool window; the class is derived from Control and realized in the IToolWorkArea.
You can define your own tool windows in plug-ins. A class must already be set for this and is then used for setting the window's contents. This class must have the following properties:
The class must be a specialization of System.Windows.Controls.Control. Indirect inheritance is also possible.
It is a good idea to use an XAML file based on ContentControl or UserControl. Window contents can be defined in this XAML file.
The class must realize the IToolWorkArea interface.
The interface's properties and methods are used for sending messages from the framework to the window and for reading window data through the framework.
See the MID.Innovator.Plugin.Sample.HelloToolWindow sample for creating a simple tool window.
Each tool window needs a unique string identifier which can be used for addressing the tool window within the model. The class needs to implement the IToolWorkArea.ToolWindowType property for this. The identifier is restricted in terms of permissible characters. It is a good idea to use the FrameworkManager.GetToolWindowType function to build the string.
IToolWorkArea is a specialization of IWorkArea; its properties and methods therefore also need to be implemented. These are dealt with in the following sections.
Tool windows are created when a model is opened, i.e. in RequestHandler when editing the OpenModel model.
A command is generated for the newly-created window in the View>Window>Tool Windows menu and can be used for showing the tool window.
© 1986-2014 MID GmbH Nuremberg Germany. DIN EN 9001 certified. All rights reserved.