Share via


IVsUIContextManager.AdviseSpecificUIContextEvents Method

Definition

Advises callback events for the given UI context.

public uint AdviseSpecificUIContextEvents(Microsoft.VisualStudio.Shell.Interop.IVsUIContextEvents callback, in Guid uiContext);
abstract member AdviseSpecificUIContextEvents : Microsoft.VisualStudio.Shell.Interop.IVsUIContextEvents * Guid -> uint32
Public Function AdviseSpecificUIContextEvents (callback As IVsUIContextEvents, uiContext As Guid) As UInteger

Parameters

callback
IVsUIContextEvents

The callback to invoke when the given UI context activation state changes, if we end up subscribing to change events.

uiContext
Guid

The identifier of the UI context whose change events you want to subscribe to if it's not active.

Returns

A cookie representing your subscription.

Remarks

This method is safe to access from any thread, though do be aware that if this method is called off the UI thread while a context is actively being set on the UI thread, the registered callback may miss the change notification.

Applies to