Struct InputBinding
A generic input binding used for programmatic command invocations or when a specific binding type is not needed.
public struct InputBinding : IInputBinding, IEquatable<InputBinding>
- Implements
- Inherited Members
Remarks
Use InputBinding when invoking commands programmatically via InvokeCommand(Command) or when a binding is needed but is not associated with a specific key or mouse event.
Pattern match on binding types to discriminate between input sources:
if (ctx.Binding is KeyBinding kb) { /* key input */ }
else if (ctx.Binding is MouseBinding mb) { /* mouse input */ }
else if (ctx.Binding is InputBinding ib) { /* programmatic */ }
Constructors
- InputBinding(Command[], View?, object?)
Initializes a new instance.
Properties
- Commands
The commands this binding will invoke.
- Data
Arbitrary context that can be associated with this input binding.