Table of Contents

Class ControlBindingHelper

Namespace
Tripous.Desktop
Assembly
Tripous.Desktop.dll

Provides helper methods for binding Avalonia controls to data rows.

public static class ControlBindingHelper
Inheritance
ControlBindingHelper
Inherited Members

Methods

Bind(IRowProvider, CalendarDatePicker, string, DataColumn, FieldDef)

Binds a calendar date picker to a row field.

public static ControlBinding Bind(IRowProvider RowProvider, CalendarDatePicker Box, string FieldName, DataColumn DataColumn, FieldDef FieldDef = null)

Parameters

RowProvider IRowProvider

The row provider.

Box CalendarDatePicker

The calendar date picker.

FieldName string

The field name.

DataColumn DataColumn

The data column.

FieldDef FieldDef

The field definition.

Returns

ControlBinding

The created control binding.

Bind(IRowProvider, CheckBox, string, DataColumn, FieldDef)

Binds a check box to a row field.

public static ControlBinding Bind(IRowProvider RowProvider, CheckBox Box, string FieldName, DataColumn DataColumn, FieldDef FieldDef = null)

Parameters

RowProvider IRowProvider

The row provider.

Box CheckBox

The check box.

FieldName string

The field name.

DataColumn DataColumn

The data column.

FieldDef FieldDef

The field definition.

Returns

ControlBinding

The created control binding.

Bind(IRowProvider, ComboBox, string, DataColumn, IEnumerable, FieldDef)

Binds a combo box to a row field.

public static ControlBinding Bind(IRowProvider RowProvider, ComboBox Box, string FieldName, DataColumn DataColumn, IEnumerable Items, FieldDef FieldDef = null)

Parameters

RowProvider IRowProvider

The row provider.

Box ComboBox

The combo box.

FieldName string

The field name.

DataColumn DataColumn

The data column.

Items IEnumerable

The items source.

FieldDef FieldDef

The field definition.

Returns

ControlBinding

The created control binding.

Bind(IRowProvider, DatePicker, string, DataColumn, FieldDef)

Binds a date picker to a row field.

public static ControlBinding Bind(IRowProvider RowProvider, DatePicker Box, string FieldName, DataColumn DataColumn, FieldDef FieldDef = null)

Parameters

RowProvider IRowProvider

The row provider.

Box DatePicker

The date picker.

FieldName string

The field name.

DataColumn DataColumn

The data column.

FieldDef FieldDef

The field definition.

Returns

ControlBinding

The created control binding.

Bind(IRowProvider, ListBox, string, DataColumn, IEnumerable, FieldDef)

Binds a list box to a row field.

public static ControlBinding Bind(IRowProvider RowProvider, ListBox Box, string FieldName, DataColumn DataColumn, IEnumerable Items, FieldDef FieldDef = null)

Parameters

RowProvider IRowProvider

The row provider.

Box ListBox

The list box.

FieldName string

The field name.

DataColumn DataColumn

The data column.

Items IEnumerable

The items source.

FieldDef FieldDef

The field definition.

Returns

ControlBinding

The created control binding.

Bind(IRowProvider, NumericUpDown, string, DataColumn, FieldDef)

Binds a numeric up-down control to a row field.

public static ControlBinding Bind(IRowProvider RowProvider, NumericUpDown Box, string FieldName, DataColumn DataColumn, FieldDef FieldDef = null)

Parameters

RowProvider IRowProvider

The row provider.

Box NumericUpDown

The numeric up-down control.

FieldName string

The field name.

DataColumn DataColumn

The data column.

FieldDef FieldDef

The field definition.

Returns

ControlBinding

The created control binding.

Bind(IRowProvider, TextBox, string, DataColumn, FieldDef)

Binds a text box to a row field.

public static ControlBinding Bind(IRowProvider RowProvider, TextBox Box, string FieldName, DataColumn DataColumn, FieldDef FieldDef = null)

Parameters

RowProvider IRowProvider

The row provider.

Box TextBox

The text box.

FieldName string

The field name.

DataColumn DataColumn

The data column.

FieldDef FieldDef

The field definition.

Returns

ControlBinding

The created control binding.

Bind(IRowProvider, LocatorBox, FieldDef)

Binds a locator box to a row field.

public static ControlBinding Bind(IRowProvider RowProvider, LocatorBox Box, FieldDef FieldDef)

Parameters

RowProvider IRowProvider

The row provider.

Box LocatorBox

The locator box.

FieldDef FieldDef

The field definition.

Returns

ControlBinding

The created control binding.

BindImage(IRowProvider, Image, string, DataColumn, FieldDef)

Binds an image control to a row field.

public static ControlBinding BindImage(IRowProvider RowProvider, Image Box, string FieldName, DataColumn DataColumn, FieldDef FieldDef = null)

Parameters

RowProvider IRowProvider

The row provider.

Box Image

The image control.

FieldName string

The field name.

DataColumn DataColumn

The data column.

FieldDef FieldDef

The field definition.

Returns

ControlBinding

The created control binding.

BindLookup(IRowProvider, ComboBox, string, DataColumn, string, FieldDef)

Binds a lookup combo box to a row field.

public static ControlBinding BindLookup(IRowProvider RowProvider, ComboBox Box, string FieldName, DataColumn DataColumn, string LookupSourceName, FieldDef FieldDef = null)

Parameters

RowProvider IRowProvider

The row provider.

Box ComboBox

The combo box.

FieldName string

The field name.

DataColumn DataColumn

The data column.

LookupSourceName string

The lookup source name.

FieldDef FieldDef

The field definition.

Returns

ControlBinding

The created control binding.

BindLookup(IRowProvider, ComboBox, string, DataColumn, FieldDef)

Binds a lookup combo box to a row field.

public static ControlBinding BindLookup(IRowProvider RowProvider, ComboBox Box, string FieldName, DataColumn DataColumn, FieldDef FieldDef)

Parameters

RowProvider IRowProvider

The row provider.

Box ComboBox

The combo box.

FieldName string

The field name.

DataColumn DataColumn

The data column.

FieldDef FieldDef

The field definition.

Returns

ControlBinding

The created control binding.

BindMemo(IRowProvider, TextBox, string, DataColumn, FieldDef)

Binds a multi-line text box to a row field.

public static ControlBinding BindMemo(IRowProvider RowProvider, TextBox Box, string FieldName, DataColumn DataColumn, FieldDef FieldDef = null)

Parameters

RowProvider IRowProvider

The row provider.

Box TextBox

The text box.

FieldName string

The field name.

DataColumn DataColumn

The data column.

FieldDef FieldDef

The field definition.

Returns

ControlBinding

The created control binding.

Refresh(IRowProvider, ControlBinding)

Refreshes a bound control from its row field.

public static void Refresh(IRowProvider RowProvider, ControlBinding Binding)

Parameters

RowProvider IRowProvider

The row provider.

Binding ControlBinding

The control binding.