Table of Contents

Property Value

Namespace
Terminal.Gui.Views
Assembly
Terminal.Gui.dll

Value

Gets or sets the most recently activated MenuItem.

public MenuItem? Value { get; set; }

Property Value

MenuItem

Remarks

This property is automatically set when a MenuItem within this menu raises the Accepted event (e.g., when the user presses Enter or double-clicks on a menu item).

The value is captured before the Accept command propagates up the hierarchy, enabling command handlers to access Value to determine which menu item triggered the command.

Setting this property programmatically will raise ValueChanging and ValueChanged events following the Cancellable Work Pattern (CWP).