Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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);
share|improve this question
    
What's the use case? Why do you want to do this? –  blah238 Dec 15 '12 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. –  Petr Krebs Dec 16 '12 at 11:00

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
Yes, the same holds true for the classic IDockableWindowDef implementations. –  Petr Krebs Dec 16 '12 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. –  steffan Dec 21 '12 at 17:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.