2

I am building an add-in and I have several different windows, which I open with the code below. This works fine. However, how can I create the same window n times?

 UID dockWinID = new UIDClass();
 dockWinID.Value = ThisAddIn.IDs.MyWindow;
 IDockableWindow dockWindow = ArcMap.DockableWindowManager.GetDockableWindow(dockWinID);
 dockWindow.Show(true);
asked Dec 15, 2012 at 2:38
2
  • What's the use case? Why do you want to do this? Commented Dec 15, 2012 at 6:03
  • Maybe something similar to attribute table windows? They are dockable. AFAIK, these windows are implemented as IDataWindows. I wonder if GenericWindow could help here, though it seems to be (uncomfortably) tied to ActiveX. Commented Dec 16, 2012 at 11:00

1 Answer 1

3

No, all add-in framework types are singletons (source), meaning they are only intended to exist one at a time. I am not sure but I think the same is also true for traditional COM dockable windows.

answered Dec 15, 2012 at 3:30
2
  • Yes, the same holds true for the classic IDockableWindowDef implementations. Commented Dec 16, 2012 at 10:55
  • Okay. As a workaround I manage the windows by myself with the WindowInteropHelper. I lost all the benefits like docking in ArcMap, but that was never important for me. Commented Dec 21, 2012 at 17:12

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.