Table of Contents

Interface IValue<TValue>

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

Interface for views that provide a strongly-typed value.

public interface IValue<TValue> : IValue

Type Parameters

TValue

The type of the value.

Inherited Members

Remarks

Views implementing this interface can be used with Prompt<TView, TResult> for automatic result extraction without requiring an explicit resultExtractor.

Implementers should use ChangeProperty<T>(object?, ref T, T, Func<ValueChangingEventArgs<T>, bool>?, EventHandler<ValueChangingEventArgs<T>>?, Action<T>, Action<ValueChangedEventArgs<T>>?, EventHandler<ValueChangedEventArgs<T>>?, out T) to implement the Value property setter, which follows the Cancellable Work Pattern (CWP).

This interface inherits from IValue and provides a default implementation of GetValue() that returns the boxed Value.

Properties

Value

Gets or sets the value.

Events

ValueChanged

Raised when Value has changed.

ValueChanging

Raised when Value is about to change. Set Handled to true to cancel the change.

See Also