Reputation: 303
I'm developing an Add-in in C# for Enterprise Architect, when user selects a menu item then a WPF GUI will pop-up.
How can I make this WPF GUI to dock (using docking) on Enterprise Architect GUI? Can I make the add-in GUI dockable?
Upvotes: 0
Views: 194
Reputation: 13784
Yes, you can use Repository.AddTab()
or Repository.AddWindow()
depending if you want your window to show up in the main diagram part, or as a regular docked window
From the manual:
AddTab (string TabName, string ControlID)
activeX custom control
Notes: Adds an ActiveX custom control as a tabbed window. Enterprise Architect creates a control and, if successful, returns its Unknown pointer, which can be used by the caller to manipulate the control.
Parameters:
TabName: String - used as the tab caption ControlID: String - the ProgID of the control; for example, "CS_AddinFramework.UserControl1"
AddWindow (string WindowName, string ControlID)
Notes: Adds an ActiveX custom control as a window to the Add-Ins docked window. Enterprise Architect creates a control and, if successful, returns its Unknown pointer, which can be used by the caller to manipulate the control.
Parameters:
WindowName: String - used as the window title ControlID: String - the ProgID of the control; for example, "CS_AddinFramework.UserControl1"
You might need to wrap your WPF window into a Winforms Control in order to allow EA to create it as an ActiveX control.
This is an example of an add-in I wrote: the EA Navigator
Upvotes: 2