# DirectBinding<T> 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 abstract class DirectBinding<T> : Binding
```

Abstraction to get/set values from a provided object

**Remarks:** This binding provides a way to get/set values of an object that is provided by the binding, and not passed in. This differs from the [IndirectBinding<T>](https://eto.picoe.ca/api/type/eto.forms.indirectbinding-1.md), which requires that the caller pass in the object to get/set the value from/to.

**Type parameters:**

- `T`

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

## Fields

- [DataValueChangedEvent](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/datavaluechangedevent.md): (static) Identifier for the [DirectBinding<T>.DataValueChanged](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/datavaluechanged.md) event

## Properties

- [DataValue](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/datavalue.md): Gets or sets the value of this binding

## Methods

- [Cast<TValue>](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/cast.md): Casts this binding value to another (compatible) type.
- [CatchException](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/catchexception.md): (2 overloads) Catches any exceptions when setting the value of the binding
- [Child<TValue>](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/child.md): (2 overloads) Binds to the specified child `property` expression.
- [Convert<TValue>](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/convert.md): (3 overloads) Converts this binding's value to another value using delegates.
- [OnDataValueChanged](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/ondatavaluechanged.md): Handles the [DirectBinding<T>.DataValueChanged](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/datavaluechanged.md) event
- [ToBool](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/tobool.md): (3 overloads) Converts this binding to return a nullable boolean binding
- [ToType<TType>](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/totype.md): Uses System.Convert.ChangeType to change the value of the binding to the specified type.

## Events

- [DataValueChanged](https://eto.picoe.ca/api/type/eto.forms.directbinding-1/datavaluechanged.md): Event to handle when the value changes on the bound object

## Inherited Members

- 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)
