VS Isolated Shell creating custom document windows RRS feed

  • Question

  • I am trying to create custom document windows in VS isolated shell. What I hope to have is something similar to a ToolWindowPane where I can extend it for my custom tool windows and set the content to my custom user control. However, I am not sure if this is possible for VS document windows. I could not find any examples on how to extend the superclass WindowPane in order to create custom document windows that can be repeatedly created dynamically. Any pointers or suggestions are greatly appreciated!

    Edit: Found answer here: http://social.msdn.microsoft.com/forums/en/vsx/thread/d60f8cef-2523-4b53-8f24-92eb90912e7c/

    Edit: However, I would still like to create an actual document window instead of a ToolWindowPane framed in a document frame. Essentially, is there an equivalent of ToolWindowPane for document windows?

    • Edited by Jinatonic Wednesday, July 11, 2012 11:29 PM
    Wednesday, July 11, 2012 9:35 PM


  • That post is somewhat odd, and the entire scenario isn't clear.  Why do you want a toolwindow that is a document? If you want custom documents you need to create an editor factory, it can return, as its view, anything you want, including a WindowPane derived object hosting arbitrary content.  If you just want a multi-instance toolwindow, you can do that as well. 2012 also supplies an extension to ProvideToolWindowAttribute with a property called DocumentLikeTool, the MSDN documentation on that is...missing, so the code file comment describes it as:

    /// Set to true if you want a tool window that behaves and has a lifetime like a document.
    /// The tool window will only be MDI or floating and will remain visible in its position across all layout changes
    /// until manualy closed by the user at which point it will be destroyed. 
    /// This flag implies DontForceCreate and destructive multi instance.

    It gives basically the document behavior of not disappearing on mode changes (i.e. from Design->Debug and back, among others) as well as being multi-instance able (i.e. you can create as many as you want, whereas normal toolwindows are singleton).


    • Marked as answer by Jinatonic Wednesday, July 18, 2012 12:58 AM
    Thursday, July 12, 2012 12:16 AM