Property Binding
Binding
The binding that triggered the command.
public IInputBinding? Binding { readonly get; set; }
Property Value
Remarks
Use pattern matching to access specific binding types:
if (ctx.Binding is KeyBinding kb) { /* key binding */ }
else if (ctx.Binding is MouseBinding mb) { /* mouse binding */ }
else if (ctx.Binding is InputBinding ib) { /* programmatic */ }