IValueCommand<T>

References
public interface IValueCommand<T> : ICommand
Interface for a command that can provide a value
Remarks: Some controls can provide a value, which can be difficult to get via the command when the value changes. This inteface allows you to extend your command to allow getting and setting a value of any type and have an event when the value changes programatically.
T
ValueCommand<T>

Methods

GetValue

#
T GetValue(object parameter)
Gets the current value in the command.
Remarks: This is typically called by the control when the ValueChanged event is raised.
parameter (object)CommandParameter from the control/widget.
The value.

SetValue

#
void SetValue(object parameter, T value)
Sets the value in the command from the control.
Remarks: This is typically invoked when the control has updated its value.
parameter (object)CommandParameter from the control/widget.
value (T)Value to set to.

Events

ValueChanged

#
event EventHandler<EventArgs> ValueChanged
Event to signal to the control/widget that the value has been changed.
Remarks: Controls should call GetValue(object) when this is raised so that they can set the state of the control to match the value provided.