Event CommandNotBound
Cancelable event raised when a command that has not been bound (via AddCommand) is invoked.
Set CommandEventArgs.Handled to true to indicate the event was handled and processing should
stop.
public event EventHandler<CommandEventArgs>? CommandNotBound
Returns
- EventHandler<CommandEventArgs>
- Cancelable event raised when a command that has not been bound (via AddCommand) is invoked. Set CommandEventArgs.Handled to true to indicate the event was handled and processing should stop.
Remarks
This event fires as part of the command bubbling mechanism. A common use case is a SubView that binds mouse-wheel events to scroll commands (via MouseBindings) without adding a local handler. The unhandled command fires this event, and if not cancelled here, TryBubbleUp(ICommandContext?, bool) forwards the command to the nearest ancestor whose CommandsToBubbleUp includes it.
See also: CommandsToBubbleUp, TryBubbleUp(ICommandContext?, bool).