locked
View Code / View Designer menu items and editors RRS feed

  • Question

  • Hi

    I'm working on new project and i work on the "Visual Studio Package" and create costume editor.

    I wont to make text editor that i get from the templet of the project and also a design editor that is a WPF control

    I don't know how to make the design view

     

    need help Please

    Yosi

    Tuesday, June 22, 2010 12:47 PM

Answers

  • Hi, Yosi

    Do you mean you want to development a multi-view editor? One is the code editor, the other is view designer created by WPF.

    Actually you need to development two editors, the two editor should share the same text buffer and you need to synchronize the two views.

    1.    For code editor, maybe you just need to invoke the Core editor(Core editor is just the text editor in visual studio which the VB.net and C# code editor), see this for invoking a code editor.

    http://msdn.microsoft.com/en-us/library/bb165071(VS.80).aspx

    2.    For View Synchronization. Please see the following two links

    Supporting Multiple Document Views

    And for attach the buffer to your different views. See this link

    How to: Attach Views to Document Data Objects

    Example.XmlDesigner is a good example for implementing that. It is shipped with visual studio 2005 SDK. Please download and see this, and especially its implementation of IVsEditorFactory.CreateEditorInstance method in EditFactory class.

    Thanks

    Chao

    • Marked as answer by Chao Kuo Tuesday, June 29, 2010 1:33 AM
    Wednesday, June 23, 2010 9:22 AM