SixPairs

February 24, 2011

Visual Studio Package Events Sample

Filed under: VSPackage — Ceyhun Ciper @ 19:21

Capturing VS events inside a VSPackage

In order to capture events (such as “Solution Opened”) in a VSPackage, you must already have a pointer to the DTE in your control; this pointer is usually passed to your control from your tool window. And of course, this cannot be done during the construction phase of the tool window; it must be done after the tool window is created.

Here is a simplistic view of the sequence of events:

image

A sample package is published @ Visual Studio Gallery.

 

image

Create a free website or blog at WordPress.com.