Table of Contents

Event SchemeNameChanging

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

Raised before the SchemeName property changes, allowing handlers to modify or cancel the change.

public event EventHandler<ValueChangingEventArgs<string?>>? SchemeNameChanging

Returns

EventHandler<ValueChangingEventArgs<string>>
Raised before the property changes, allowing handlers to modify or cancel the change.

Examples

view.SchemeNameChanging += (sender, args) =>
{
    if (args.NewValue == "InvalidScheme")
    {
        args.Handled = true;
        Console.WriteLine("Invalid scheme name cancelled.");
    }
};

Remarks

Set Handled to true to cancel the change or modify NewValue to adjust the proposed value.