1

Installed products

  • Visual Studio 2017 15.6.1

Description

Visual Studio extension that contains a toolbar with drop down combo still receives advised selection(IVsSelectionEvents) events after toolbar is hidden.

Steps to recreate

  1. Use Drop Down Combo from https://github.com/Microsoft/VSSDK-Extensibility-Samples/tree/master/Combo_Box sample
  2. Use IVsMonitorSelection.AdviseSelectionEvents()
  3. Hide the toolbar.

Current behavior

I could not find any event to be notified when toolbar is hidden/shown so could not stop receiving IVsSelectionEvents interfaces OnSelectionChanged event.

Expected behavior

Notified when toolbar is hidden or shown so Advise/UnadviseSelectionEvents() could be called.

So, i need an event that is triggered when toolbar is shown and hidden.

subcoder
  • 636
  • 8
  • 15
  • @susbcode, If you want to know whether it is shown or hidden, why not make it shown in default? https://stackoverflow.com/questions/11035795/show-a-visual-studio-extension-toolbar-by-default – Jack Zhai Apr 16 '18 at 08:38
  • @jack-zhai-msft, its already shown that's not problem. I need to know whenever its hidden by right clicking the VS toolbar and uncheck it and when its shown by checking it again. – subcoder Apr 18 '18 at 06:37

0 Answers0