I am writing a Visual Studio 2008 extension. I want to be notified every time DTE.ActiveDocument changes, so I can update something in a custom panel which performs a similar feature to solution explorer. I have yet to find any event which occurs when this happens. Is there such an event?

Concretely, I'm looking for something like:

var dte = GetService(typeof(EnvDTE._DTE)) as EnvDTE.DTE;
dte.Events.DTEEvents.ActiveDocumentChanged += s => {
    // implies dte.ActiveDocument has changed value
}
Edit
Report