次の方法で共有


VsShellUtilities.OnPropertyChanged Method

Definition

Invokes a callback each time a shell property changes.

public:
[System::Runtime::CompilerServices::Extension]
 static IDisposable ^ OnPropertyChanged(Microsoft::VisualStudio::Shell::Interop::IVsShell ^ shell, int propid, Action<System::Object ^> ^ callback);
public static IDisposable OnPropertyChanged (this Microsoft.VisualStudio.Shell.Interop.IVsShell shell, int propid, Action<object> callback);
static member OnPropertyChanged : Microsoft.VisualStudio.Shell.Interop.IVsShell * int * Action<obj> -> IDisposable
<Extension()>
Public Function OnPropertyChanged (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.

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

See also