Table of Contents

Struct CommandContext

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Provides context for a Command that is being invoked.

public record struct CommandContext : IEquatable<CommandContext>
Implements
Inherited Members

Remarks

To define a Command that is invoked with context, use View.AddCommand(Command,Func<CommandContext,System.Nullable<bool>>).

Constructors

CommandContext(Command, Key?, KeyBinding?, object?)

Initializes a new instance of CommandContext with the specified Command,

Properties

Command

The Command that is being invoked.

Data

Arbitrary data.

Key

The Key that is being invoked. This is the key that was pressed to invoke the Command.

KeyBinding

The KeyBinding that was used to invoke the Command, if any.

See Also