Editor in a Toolwindow

This sample shows how to host the Visual Studio 2010 editor within a toolwindow.

4 Star
6,375 times
Add to favorites
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question

  • 555-555-0199@example.com
    1 Posts | Last post October 12, 2017
    • 555-555-0199@example.com
  • Create an editor of ContextType("MyEditor")
    3 Posts | Last post October 24, 2012
    • Can you expand on this sample to show how to create an editor of my own ContextType in a tool window?
      I've gone through the sample and I can create it creates an editor of ContextType("TEXT") but I have not been able to figure out how to get my own ContextType to show up.
    • Try changing the line:
                  bufferAdapter = m_EditorAdapterFactory.CreateVsTextBufferAdapter(oleServiceProvider, bufferFactory.TextContentType);
                  var _contentTypeRegistryService = m_componentModel.GetService<IContentTypeRegistryService>();
                  var types = _contentTypeRegistryService.GetContentType("C/C++");
                  bufferAdapter = m_EditorAdapterFactory.CreateVsTextBufferAdapter(oleServiceProvider, types);
      This will give the editor window C/C++ style syntax highlighting.  You can also use "CSharp" IIRC.
      Hope that helps,
    • Hi,
      I tried changing the content type as suggested to "CSharp" but not seeing any syntax highlighting.
      Also, does the editor have intellisense support?