Deep Dive document download for the Editor with Toolbox sample included in the VS SDK.
Introduction
Visual Studio has many extensibility points related to custom editors. It has a complex and robust architecture in the background in order to allow customization. The text editor, WinForms editor and ASP.NET page editors use the same VS Shell architecture to provide editing capabilities over source files with very different faces.
The Editor with Toolbox sample in the VS SDK is one of the samples related to creating and using custom editors. This sample implements one of the simplest editors that can be written over the background infrastructure offered by Visual Studio and extends it with Toolbox support.
By going through this deep dive you get familiar with the following ideas:
What is the concept behind editor factories, document views and document data?
How to create an item type behind an editor?
What is the role of en editor factory and how it is implemented?
What interfaces define the minimum set of responsibilities for an editor pane?
How to set up collaboration between the editor and the Toolbox?
To understand concepts treated here it is assumed that you are familiar with the idea of VSPackages and you know how to build and register very simple (even non-functional) packages. To get more information about packages, please take a look at the Package Reference Sample (C# Reference.Package sample).