Property Value
Value
Gets the most recently appended value from Values, or null
if Values is empty. This is a convenience accessor equivalent to
Values.Count > 0 ? Values[^1] : null.
public object? Value { get; }
Property Value
Remarks
This enables command handlers up the hierarchy to access the source view's value without needing to know the generic type parameter of IValue<TValue>.
In a simple hierarchy (e.g., OptionSelector → ancestor), Value will be
the composite's semantic value (e.g., int? index). In a multi-layer hierarchy
(e.g., OptionSelector inside MenuItem inside PopoverMenu),
Value will be the outermost composite's value (e.g., MenuItem).
Use Values to inspect inner values.
- See Also
-
GetValue()