Table of Contents

Property Binding

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

Binding

The binding that triggered the command.

ICommandBinding? Binding { get; }

Property Value

ICommandBinding

Remarks

Use pattern matching to access specific binding types:

<pre><code class="lang-csharp">if (ctx.Binding is KeyBinding kb) { /* key binding */ }

else if (ctx.Binding is MouseBinding mb) { /* mouse binding / } else if (ctx.Binding is CommandBinding ib) { / programmatic */ }