# ObjectBinding<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 ObjectBinding<T, TValue> : DirectBinding<TValue>
```

Binding for a particular object to get/set values from/to

**Remarks:** This binding provides a way to get/set values for a particular object. This uses a [IndirectBinding<T>](https://eto.picoe.ca/api/type/eto.forms.indirectbinding-1.md) as its logic to actually retrieve/set the values. This acts as a bridge between the [IndirectBinding<T>](https://eto.picoe.ca/api/type/eto.forms.indirectbinding-1.md) and [DirectBinding<T>](https://eto.picoe.ca/api/type/eto.forms.directbinding-1.md) so that you can utilize the [DirectBinding<T>.DataValueChanged](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/datavaluechanged.md) method. Typically, one would use the [PropertyBinding<T>](https://eto.picoe.ca/api/type/eto.forms.propertybinding-1.md), or the `ObjectBinding{T,TValue}` constructor to hook up this binding to a particular property of the specified object

**Type parameters:**

- `T`: The type of object to bind to.
- `TValue`: The type of value for the binding.

**Derived types:** [BindableBinding<T, TValue>](https://eto.picoe.ca/api/type/eto.forms.bindablebinding-2.md), [ObjectBinding<TValue>](https://eto.picoe.ca/api/type/eto.forms.objectbinding-1.md)

## Constructors

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

## Properties

- [DataItem](https://eto.picoe.ca/api/type/eto.forms.objectbinding-2/dataitem.md): Gets or sets the object to get/set the values using the [ObjectBinding<T, TValue>.InnerBinding](https://eto.picoe.ca/api/type/eto.forms.objectbinding-2/innerbinding.md)
- [DataValue](https://eto.picoe.ca/api/type/eto.forms.objectbinding-2/datavalue.md): Gets or sets the value of this binding on the bound object
- [GetDataItem](https://eto.picoe.ca/api/type/eto.forms.objectbinding-2/getdataitem.md): Gets or sets a delegate used to get the current [ObjectBinding<T, TValue>.DataItem](https://eto.picoe.ca/api/type/eto.forms.objectbinding-2/dataitem.md) value instead of storing the value in this binding.
- [GettingNullValue](https://eto.picoe.ca/api/type/eto.forms.objectbinding-2/gettingnullvalue.md): Gets or sets the default value to use when getting the value for this binding when the [ObjectBinding<T, TValue>.DataItem](https://eto.picoe.ca/api/type/eto.forms.objectbinding-2/dataitem.md) or property value is null
- [InnerBinding](https://eto.picoe.ca/api/type/eto.forms.objectbinding-2/innerbinding.md): Gets the binding used to get/set the values from the [ObjectBinding<T, TValue>.DataItem](https://eto.picoe.ca/api/type/eto.forms.objectbinding-2/dataitem.md)
- [SettingNullValue](https://eto.picoe.ca/api/type/eto.forms.objectbinding-2/settingnullvalue.md): Gets or sets the default value to use when setting the value for this binding when input value is null

## Methods

- [Bind](https://eto.picoe.ca/api/type/eto.forms.objectbinding-2/bind.md): (5 overloads) Creates a new dual binding between the specified `sourceBinding` and this binding.
- [HandleEvent](https://eto.picoe.ca/api/type/eto.forms.objectbinding-2/handleevent.md): Hooks up the late bound events for this object
- [RemoveEvent](https://eto.picoe.ca/api/type/eto.forms.objectbinding-2/removeevent.md): Removes the late bound events for this object
- [ToString](https://eto.picoe.ca/api/type/eto.forms.objectbinding-2/tostring.md): Returns a `String` that represents the current `ObjectBinding`.
- [TriggerDataValueChanged](https://eto.picoe.ca/api/type/eto.forms.objectbinding-2/triggerdatavaluechanged.md): Triggers the [DirectBinding<T>.DataValueChanged](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/datavaluechanged.md) event.
- [Unbind](https://eto.picoe.ca/api/type/eto.forms.objectbinding-2/unbind.md): Unbinds this binding

## Inherited Members

- From [DirectBinding<T>](https://eto.picoe.ca/api/type/eto.forms.directbinding-1.md): [DataValueChanged](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/datavaluechanged.md), [Cast<TValue>](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/cast.md), [CatchException<TException>](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/catchexception.md), [Child<TValue>](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/child.md), [Convert<TValue>](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/convert.md), [OnDataValueChanged](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/ondatavaluechanged.md), [ToBool](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/tobool.md), [ToType<TType>](https://eto.picoe.ca/api/type/eto.forms.directbinding-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), [OnChanged](https://eto.picoe.ca/api/type/eto.forms.binding/onchanged.md), [OnChanging](https://eto.picoe.ca/api/type/eto.forms.binding/onchanging.md), [Update](https://eto.picoe.ca/api/type/eto.forms.binding/update.md)
