A reader of my article:
HOWTO: Detect when a Visual Studio toolwindow is shown or hidden.
pointed me to an inconsistent behavior of the EnvDTE80.Events2.WindowVisibilityEvents in one case, so I have investigated all the cases and I have documented all the inconsistent behaviors (which are a lot in several VS versions) in a new article:
BUG: Inconsistent behavior of EnvDTE80.Events2.WindowVisibilityEvents from a Visual Studio add-in
Since VS 11 Beta exhibits the same two bugs than VS 2010, I have opened two bug reports to Microsoft:
EnvDTE80.Events2.WindowVisibilityEvents.WindowHiding event not fired when collapsing toolwindow
EnvDTE80.Events2.WindowVisibilityEvents.WindowShowing event fired twice