UIContext UIContext UIContext UIContext Class

Definition

Represents the active state of a UIContext

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

Properties

IsActive IsActive IsActive IsActive

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

Methods

FromUIContextGuid(Guid) FromUIContextGuid(Guid) FromUIContextGuid(Guid) FromUIContextGuid(Guid)

Constructs a UIContext instance identified with the given guid.

GetAwaiter() GetAwaiter() GetAwaiter() 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) OnShellPropertyChange(Int32, Object) OnShellPropertyChange(Int32, Object) OnShellPropertyChange(Int32, Object)
WhenActivated(Action) WhenActivated(Action) WhenActivated(Action) 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 PropertyChanged PropertyChanged PropertyChanged

Event that fires when the IsActive property changes values.

UIContextChanged UIContextChanged UIContextChanged UIContextChanged

Event that fires whenever the UIContext becomes active or inactive.

Extension Methods

FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)
IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

Applies to