# RelayValueCommand<TParameter, TValue> class

Namespace: [Eto.Forms](https://eto.picoe.ca/api/namespace/eto.forms.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md)

```cs
public class RelayValueCommand<TParameter, TValue> : RelayCommand<TParameter>, IValueCommand<TValue>
```

A [IValueCommand<T>](https://eto.picoe.ca/api/type/eto.forms.ivaluecommand-1.md) class that uses delegates for getting and setting the value of the command with the command parameter.

**Remarks:** This can be used to delegate the getting/setting of the value to separate methods. Call [RelayValueCommand<TParameter, TValue>.UpdateValue()](https://eto.picoe.ca/api/type/eto.forms.relayvaluecommand-2/updatevalue.md) to signal that the value has changed.

**Type parameters:**

- `TParameter`
- `TValue`

**Derived types:** [RelayValueCommand<TValue>](https://eto.picoe.ca/api/type/eto.forms.relayvaluecommand-1.md)

## Constructors

- [RelayValueCommand<TParameter, TValue>](https://eto.picoe.ca/api/type/eto.forms.relayvaluecommand-2/ctor.md): Initializes a new instance of the `RelayValueCommand` class.

## Methods

- [GetValue](https://eto.picoe.ca/api/type/eto.forms.relayvaluecommand-2/getvalue.md): Gets the value.
- [OnValueChanged](https://eto.picoe.ca/api/type/eto.forms.relayvaluecommand-2/onvaluechanged.md): Raises the [RelayValueCommand<TParameter, TValue>.ValueChanged](https://eto.picoe.ca/api/type/eto.forms.relayvaluecommand-2/valuechanged.md) event.
- [SetValue](https://eto.picoe.ca/api/type/eto.forms.relayvaluecommand-2/setvalue.md): Sets the value.
- [UpdateValue](https://eto.picoe.ca/api/type/eto.forms.relayvaluecommand-2/updatevalue.md): Signals that the value has been updated and the delegate to get the value should be called.

## Events

- [ValueChanged](https://eto.picoe.ca/api/type/eto.forms.relayvaluecommand-2/valuechanged.md): Event to signal to the control/widget that the value has been changed.

## Inherited Members

- From [RelayCommand<T>](https://eto.picoe.ca/api/type/eto.forms.relaycommand-1.md): [CanExecuteChanged](https://eto.picoe.ca/api/type/eto.forms.relaycommand-1/canexecutechanged.md), [CanExecute](https://eto.picoe.ca/api/type/eto.forms.relaycommand-1/canexecute.md), [Execute](https://eto.picoe.ca/api/type/eto.forms.relaycommand-1/execute.md), [OnCanExecuteChanged](https://eto.picoe.ca/api/type/eto.forms.relaycommand-1/oncanexecutechanged.md), [UpdateCanExecute](https://eto.picoe.ca/api/type/eto.forms.relaycommand-1/updatecanexecute.md)

## See Also

- [ValueCommand<T>](https://eto.picoe.ca/api/type/eto.forms.valuecommand-1.md)
