# DelegateBinding<T, 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 DelegateBinding<T, TValue> : IndirectBinding<TValue>
```

Indirect binding using delegate methods

**Remarks:** This is an indirect binding, in that the object to get/set the values from/to is passed to each of the delegates to get/set the value. This is used for things like columns in a [Grid](https://eto.picoe.ca/api/type/eto.forms.grid.md) control to bind to specific values of each item in the grid.

**Type parameters:**

- `T`: Type of the object this binding will get/set the values from/to
- `TValue`: Type of the value this binding will get/set

## Constructors

- [DelegateBinding<T, TValue>](https://eto.picoe.ca/api/type/eto.forms.delegatebinding-2/ctor.md): (3 overloads) Initializes a new instance of the [DelegateBinding<T, TValue>](https://eto.picoe.ca/api/type/eto.forms.delegatebinding-2.md) class.

## Properties

- [AddChangeEvent](https://eto.picoe.ca/api/type/eto.forms.delegatebinding-2/addchangeevent.md): Gets or sets the delegate to register the change event, when needed by the consumer of this binding.
- [DefaultGetValue](https://eto.picoe.ca/api/type/eto.forms.delegatebinding-2/defaultgetvalue.md): Gets or sets the default get value, when the object instance is null.
- [DefaultSetValue](https://eto.picoe.ca/api/type/eto.forms.delegatebinding-2/defaultsetvalue.md): Gets or sets the default set value, when the incoming value is null.
- [GetValue](https://eto.picoe.ca/api/type/eto.forms.delegatebinding-2/getvalue.md): Gets or sets the delegate to get the value for this binding.
- [RemoveChangeEvent](https://eto.picoe.ca/api/type/eto.forms.delegatebinding-2/removechangeevent.md): Gets or sets the delegate to remove the change event.
- [SetValue](https://eto.picoe.ca/api/type/eto.forms.delegatebinding-2/setvalue.md): Gets or sets the delegate to set the value for this binding.

## Methods

- [AddValueChangedHandler](https://eto.picoe.ca/api/type/eto.forms.delegatebinding-2/addvaluechangedhandler.md): Wires an event handler to fire when the property of the dataItem is changed
- [InternalGetValue](https://eto.picoe.ca/api/type/eto.forms.delegatebinding-2/internalgetvalue.md): Implements the logic to get the value from the specified object
- [InternalSetValue](https://eto.picoe.ca/api/type/eto.forms.delegatebinding-2/internalsetvalue.md): Implements the logic to set the value to the specified object
- [RemoveValueChangedHandler](https://eto.picoe.ca/api/type/eto.forms.delegatebinding-2/removevaluechangedhandler.md): Removes the handler for the specified reference from [DelegateBinding<T, TValue>.AddValueChangedHandler(object, EventHandler<EventArgs>)](https://eto.picoe.ca/api/type/eto.forms.delegatebinding-2/addvaluechangedhandler.md)

## Inherited Members

- From [IndirectBinding<T>](https://eto.picoe.ca/api/type/eto.forms.indirectbinding-1.md): [AfterDelay](https://eto.picoe.ca/api/type/eto.forms.indirectbinding-1/afterdelay.md), [Cast<TValue>](https://eto.picoe.ca/api/type/eto.forms.indirectbinding-1/cast.md), [CatchException<TException>](https://eto.picoe.ca/api/type/eto.forms.indirectbinding-1/catchexception.md), [Child<TNewValue>](https://eto.picoe.ca/api/type/eto.forms.indirectbinding-1/child.md), [Convert](https://eto.picoe.ca/api/type/eto.forms.indirectbinding-1/convert.md), [EnumToString](https://eto.picoe.ca/api/type/eto.forms.indirectbinding-1/enumtostring.md), [GetValue](https://eto.picoe.ca/api/type/eto.forms.indirectbinding-1/getvalue.md), [OfType<TValue>](https://eto.picoe.ca/api/type/eto.forms.indirectbinding-1/oftype.md), [SetValue](https://eto.picoe.ca/api/type/eto.forms.indirectbinding-1/setvalue.md), [ToBool](https://eto.picoe.ca/api/type/eto.forms.indirectbinding-1/tobool.md), [ToType<TType>](https://eto.picoe.ca/api/type/eto.forms.indirectbinding-1/totype.md)
- From [Binding](https://eto.picoe.ca/api/type/eto.forms.binding.md): [Changed](https://eto.picoe.ca/api/type/eto.forms.binding/changed.md), [Changing](https://eto.picoe.ca/api/type/eto.forms.binding/changing.md), [HandleEvent](https://eto.picoe.ca/api/type/eto.forms.binding/handleevent.md), [OnChanged](https://eto.picoe.ca/api/type/eto.forms.binding/onchanged.md), [OnChanging](https://eto.picoe.ca/api/type/eto.forms.binding/onchanging.md), [RemoveEvent](https://eto.picoe.ca/api/type/eto.forms.binding/removeevent.md), [Unbind](https://eto.picoe.ca/api/type/eto.forms.binding/unbind.md), [Update](https://eto.picoe.ca/api/type/eto.forms.binding/update.md)
