VsShellUtilities.WhenPropertyChanged Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Invokes a callback when a shell property next changes.
public:
[System::Runtime::CompilerServices::Extension]
static IDisposable ^ WhenPropertyChanged(Microsoft::VisualStudio::Shell::Interop::IVsShell ^ shell, int propid, Action<System::Object ^> ^ callback);
public static IDisposable WhenPropertyChanged (this Microsoft.VisualStudio.Shell.Interop.IVsShell shell, int propid, Action<object> callback);
static member WhenPropertyChanged : Microsoft.VisualStudio.Shell.Interop.IVsShell * int * Action<obj> -> IDisposable
<Extension()>
Public Function WhenPropertyChanged (shell As IVsShell, propid As Integer, callback As Action(Of Object)) As IDisposable
Parameters
- shell
- IVsShell
The shell service.
- propid
- Int32
The property to listen for changes to.
Returns
A disposable that may cancel the subscription early.
Remarks
Must be called while on the main thread.