VsShellUtilities.OnPropertyChanged Method

Definition

Invokes a callback each time a shell property changes.

C++
public:
[System::Runtime::CompilerServices::Extension]
 static IDisposable ^ OnPropertyChanged(Microsoft::VisualStudio::Shell::Interop::IVsShell ^ shell, int propid, Action<System::Object ^> ^ callback);

Parameters

shell
IVsShell

The shell service.

propid
Int32

The property to listen for changes to.

callback
Action<Object>

The callback to invoke each time the property changes.

Returns

A disposable that may cancel the subscription.

Remarks

Must be called while on the main thread.

Applies to

Proizvod Verzije
Visual Studio SDK 2019, 2022

See also