UIContext Class

Definition

Represents the active state of a UIContext

public ref class UIContext sealed : System::ComponentModel::INotifyPropertyChanged
public ref class UIContext sealed : Microsoft::VisualStudio::Shell::Interop::IVsShellPropertyEvents, System::ComponentModel::INotifyPropertyChanged
public sealed class UIContext : System.ComponentModel.INotifyPropertyChanged
public sealed class UIContext : Microsoft.VisualStudio.Shell.Interop.IVsShellPropertyEvents, System.ComponentModel.INotifyPropertyChanged
type UIContext = class
    interface INotifyPropertyChanged
type UIContext = class
    interface INotifyPropertyChanged
    interface IVsShellPropertyEvents
Public NotInheritable Class UIContext
Implements INotifyPropertyChanged
Public NotInheritable Class UIContext
Implements INotifyPropertyChanged, IVsShellPropertyEvents
Inheritance
UIContext
Implements

Properties

IsActive

Returns the current state of the UIContext whether it is active or not.

IsZombie

Gets a value indicating whether this UIContext is a zombie. This can be true when VS is in command line mode, or if this value is queried for too early during startup.

Methods

FromUIContextGuid(Guid)

Constructs a UIContext instance identified with the given guid.

GetAwaiter()

Method that enables UIContexts to be awaitable. The awaiter resumes the caller on the same context, i.e., If the caller was on the UI thread when awaited, the code after the await would resume on the UI thread.

OnShellPropertyChange(Int32, Object)
WhenActivated(Action)

Execute the given action if the context is active. If the context is not currently active, the action will be executed when it is first activated. The action executes at most once.

Events

PropertyChanged

Event that fires when the IsActive property changes values.

UIContextChanged

Event that fires whenever the UIContext becomes active or inactive.

Applies to