Here is the code in C#: UID dockWinID = new UIDClass(); dockWinID.Value = ThisAddIn.IDs.DockableWindow1; // Use GetDockableWindow directly as we want the client IDockableWindow not the internal class IDockableWindow dockWindow = ArcMap.DockableWindowManager.GetDockableWindow(dockWinID); dockWindow.Show(true);
UID dockWinID = new UIDClass(); dockWinID.Value = ThisAddIn.IDs.DockableWindow1; // Use GetDockableWindow directly as we want the client IDockableWindow not the internal class IDockableWindow dockWindow = ArcMap.DockableWindowManager.GetDockableWindow(dockWinID); dockWindow.Show(true);
public class CAD_Test_01_button : ESRI.ArcGIS.Desktop.AddIns.Button { public CAD_Test_01_button() { } protected override void OnClick() { UID dockWinID = new UIDClass(); dockWinID.Value = ThisAddIn.IDs.DockableWindow1; // Use GetDockableWindow directly as we want the client IDockableWindow not the internal class IDockableWindow dockWindow = ArcMap.DockableWindowManager.GetDockableWindow(dockWinID); dockWindow.Show(true); } protected override void OnUpdate() { } }
... protected override void OnClick() { UID theUid = new UIDClass(); theUid.Value = ThisAddIn.IDs.dwnMapUnitLegendEditor; IDockableWindow mapUnitForm = ArcMap.DockableWindowManager.GetDockableWindow(theUid); mapUnitForm.Show(true); } ... /// <summary> /// Designer class of the dockable window add-in. It contains user interfaces that /// make up the dockable window. /// </summary> public partial class dwnMapUnitLegendEditor : UserControl { public dwnMapUnitLegendEditor(object hook) { InitializeComponent(); this.Hook = hook; } /// <summary> /// Host object of the dockable window /// </summary> private object Hook { get; set; } /// <summary> /// Implementation class of the dockable window add-in. It is responsible for /// creating and disposing the user interface class of the dockable window. /// </summary> public class AddinImpl : ESRI.ArcGIS.Desktop.AddIns.DockableWindow { private dwnMapUnitLegendEditor m_windowUI; public AddinImpl() { Console.Write("Something"); } protected override IntPtr OnCreateChild() { m_windowUI = new dwnMapUnitLegendEditor(this.Hook); return m_windowUI.Handle; } protected override void Dispose(bool disposing) { if (m_windowUI != null) m_windowUI.Dispose(disposing); base.Dispose(disposing); } }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.