Table of Contents

Method OnCommandNotBound

Namespace
Terminal.Gui.ViewBase
Assembly
Terminal.Gui.dll

OnCommandNotBound(CommandEventArgs)

Called when a command that has not been bound (via AddCommand) is invoked on this View. Set CommandEventArgs.Handled to true and return true to indicate the event was handled and processing should stop.

protected virtual bool OnCommandNotBound(CommandEventArgs args)

Parameters

args CommandEventArgs

The event arguments.

Returns

bool

true to stop processing.

Remarks

This is part of the command bubbling pipeline. When a MouseBindings entry fires a command that has no AddCommand handler, this method is called. If the command is in an ancestor's CommandsToBubbleUp list, TryBubbleUp(ICommandContext?, bool) will forward it to that ancestor.

Adding a MouseBindings entry without a corresponding AddCommand handler is intentional and idiomatic — it signals that the command should bubble to an ancestor.