Table of Contents

Interface ICommandContext

Namespace
Terminal.Gui.Input
Assembly
Terminal.Gui.dll

Describes the context in which a Command is being invoked. When a Command is invoked, a context object is passed to Command handlers as an ICommandContext reference.

public interface ICommandContext
Extension Methods

Properties

Binding

The binding that triggered the command.

Command

The Command that is being invoked.

Source

A weak reference to the View that was the source of the command invocation, if any. (e.g. the view the user clicked on or the view that had focus when a key was pressed). Use Source?.TryGetTarget(out View? view) to safely access the source view.

See Also