Search Wiki:
Deep Dive document download for the Multi-File Editor sample included in the VS SDK.

Introduction

This sample demonstrates advanced concepts related to custom editors. The Multi-File Editor uses two files (a private primary and a shared secondary file) when editing a single item. The primary file stores RTF information edited in a RichTextBox control put on the editor surface. The secondary file is shared among one or more primary documents and contains a list of text items put on the clipboard by Copy and Cut operations during editing of the primary document instances. A great feature of the Multi-File Editor is that it demonstrates how we can extend the Undo/Redo mechanism of Visual Studio by linking the undo transactions of the primary and secondary documents.
The sample was created by cloning and enhancing the Single View Editor Reference sample and assumes you are familiar more or less with the most important concepts related to custom editors (like editor factories, document view and document data). Please first go through the Single View Editor Reference Sample Deep Dive before reading this paper. Many concepts are treated there but not here:
How to create item types for an editor?
What are the points where editors can be integrated with the VS Shell?
How to create feature-full editors with macro recording capabilities?
How to set information for the VS status bar?
How macro recording works?
This example adds extra value to the Single View Editor sample by treating the following concepts:
How to create an editor factory handling multiple document data instances?
What are the responsibilities of an editor pane supporting multiple documents?
How documents interact with the Running Document Table?
How are linked undo transactions handled across primary and secondary documents?
Last edited Mar 28 at 12:05 AM  by klevy, version 2
Updating...
Page view tracker