Answered Howto create multi-tabbed custom editor

  • Monday, March 05, 2012 1:55 PM
     
     

    hello 

    I am new to VSX. and I need to create a custom editor with multi-tabbed editors.

    my question is: where do I find a tutorial or sample?

    Thanks

    Yoramo

All Replies

  • Tuesday, March 06, 2012 4:46 AM
    Moderator
     
     

    What do you mean by 'multi-tabbed editor'?  You mean an editor that has a tab-panel in itself? That sounds...confusing, there is already a tab-panel in VS that holds documents.  What does your internal one hold exactly?  As for how you would do it, your editors can contain anything you want, any tutorial on making a custom editor would work, just change the UI they have as their default UI.  I doubt there is a step-by-step tutorial on this topic as it is not common.

    Ryan

  • Tuesday, March 06, 2012 7:22 AM
     
     

    Hello Ryan

    I need to a editor window like the html editor where you have a {Design,Split,Source} tabs.

    my source editor needs to be a regular C# or VB editor and the other tabs are of custom type editor.

    thanks

    yoramo

  • Tuesday, March 06, 2012 4:03 PM
     
     

    some progress, but not working yet.

    I have created a wpf UserControl and passed it as the content of the EditorPane, inside the WPF UserControl i have a ContentControl and this control is binded to a IWpfTextViewHost   this solution works but some of the functionality is missing or generates an exception.

    can any one help here?

    thanks

    yoramo

  • Friday, March 09, 2012 7:57 AM
    Moderator
     
     

    Hi Yoramo,

    Could you explan more about "some of the functionality is missing or generates an exception", what is fuction you exact need and what's the exception you recieved.

    More over, please read Creating Custom Text Editors and Designers to see any more helps.

    Regards,

    Yi


    Yi Feng Li [MSFT]
    MSDN Community Support | Feedback to us

  • Sunday, March 11, 2012 10:31 AM
     
     

    Hello Yi Feng Li

    I'm trying to implement a solution that enables me to open more then one editor view on the same EditorPane.

    so I have created a VSX project that implements a Custom editor.The code generated by the wizard uses WinForms UserControl as the container of the editor control. 

    Now I need to embed a regular Editor (C# or VB) in the UserControl so I have added a ElementHost to the winforms usercontrol and then when the EditPane code creates the editor I'm creating a IWpfTextViewHost  and set it as the ElementHost Child.

    The result is that I do get a Editor But some functionality is missing. I have not tested for all the missing functionality but bookmarks is disabled, editing is missing functionality, moving the Slitter on the right crashes the VS. and probably some other functionality is missing. now I'm trying to figure out what needs to be done in order to get the missing functionality.  

    a sample can be very us full.

    yoramo    

  • Monday, March 12, 2012 4:38 AM
    Moderator
     
     Answered

    https://github.com/ryanmolden/ToolWindowHostedEditorExample

    I believe I ran into the splitter crash myself, not sure if there is a work around for it.

    Ryan

    • Marked As Answer by yoramo1 Tuesday, March 13, 2012 10:25 AM
    •  
  • Tuesday, March 13, 2012 10:25 AM
     
     Answered

    Hello Ryan

    Thanks for your replay. It did not solve my problem but it helped me pick a different path and look I an in a better place.

    I have succeeded hosting in more then one editor in a Window frame and one of the editors is a regular editor. some of the functionality is missing but I'm working on getting it back.

    yoramo

    • Marked As Answer by yoramo1 Tuesday, March 20, 2012 1:56 PM
    •