Class ControlBindingHelper
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
RowProviderIRowProviderThe row provider.
BoxCalendarDatePickerThe calendar date picker.
FieldNamestringThe field name.
DataColumnDataColumnThe data column.
FieldDefFieldDefThe 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
RowProviderIRowProviderThe row provider.
BoxCheckBoxThe check box.
FieldNamestringThe field name.
DataColumnDataColumnThe data column.
FieldDefFieldDefThe 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
RowProviderIRowProviderThe row provider.
BoxComboBoxThe combo box.
FieldNamestringThe field name.
DataColumnDataColumnThe data column.
ItemsIEnumerableThe items source.
FieldDefFieldDefThe 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
RowProviderIRowProviderThe row provider.
BoxDatePickerThe date picker.
FieldNamestringThe field name.
DataColumnDataColumnThe data column.
FieldDefFieldDefThe 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
RowProviderIRowProviderThe row provider.
BoxListBoxThe list box.
FieldNamestringThe field name.
DataColumnDataColumnThe data column.
ItemsIEnumerableThe items source.
FieldDefFieldDefThe 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
RowProviderIRowProviderThe row provider.
BoxNumericUpDownThe numeric up-down control.
FieldNamestringThe field name.
DataColumnDataColumnThe data column.
FieldDefFieldDefThe 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
RowProviderIRowProviderThe row provider.
BoxTextBoxThe text box.
FieldNamestringThe field name.
DataColumnDataColumnThe data column.
FieldDefFieldDefThe 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
RowProviderIRowProviderThe row provider.
BoxLocatorBoxThe locator box.
FieldDefFieldDefThe 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
RowProviderIRowProviderThe row provider.
BoxImageThe image control.
FieldNamestringThe field name.
DataColumnDataColumnThe data column.
FieldDefFieldDefThe 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
RowProviderIRowProviderThe row provider.
BoxComboBoxThe combo box.
FieldNamestringThe field name.
DataColumnDataColumnThe data column.
LookupSourceNamestringThe lookup source name.
FieldDefFieldDefThe 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
RowProviderIRowProviderThe row provider.
BoxComboBoxThe combo box.
FieldNamestringThe field name.
DataColumnDataColumnThe data column.
FieldDefFieldDefThe 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
RowProviderIRowProviderThe row provider.
BoxTextBoxThe text box.
FieldNamestringThe field name.
DataColumnDataColumnThe data column.
FieldDefFieldDefThe 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
RowProviderIRowProviderThe row provider.
BindingControlBindingThe control binding.