Class SettingsBinder
Static helper class for databinding settings to control properties.
Inherited Members
Namespace: SdlSdl.DesktopIntegrationApi
Assembly: Sdl.Desktop.IntegrationApi.dll
Syntax
public static class SettingsBinder
Methods
DataBindSetting<TSettingValue>(IBindableComponent, string, ISettingsGroup, string)
Databinds a setting to a control property, setting the control font to bold when the settings is not inherited.
Declaration
public static Binding DataBindSetting<TSettingValue>(IBindableComponent control, string propertyName, ISettingsGroup settingsGroup, string settingId)
Parameters
Type | Name | Description |
---|---|---|
IBindableComponent | control | The control to which to bind the setting. |
string | propertyName | The property of the control to which to bind the setting. |
ISettingsGroup | settingsGroup | The settings group that owns the setting. |
string | settingId | The id of the setting. |
Returns
Type | Description |
---|---|
Binding |
Type Parameters
Name | Description |
---|---|
TSettingValue | The value type of the setting. |
DataBindSetting<TSettingValue>(RadioButton[], TSettingValue[], ISettingsGroup, string)
Databinds a setting to a radiobutton with a specific datasource update mode, setting the control font to bold when the settings is not inherited.
Declaration
public static Binding DataBindSetting<TSettingValue>(RadioButton[] radioButtons, TSettingValue[] values, ISettingsGroup settingsGroup, string settingId) where TSettingValue : IComparable
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.RadioButton | radioButtons | The radiobutton to which to bind the setting. |
values | The values to which radio button should be bind. |
|
ISettingsGroup | settingsGroup | The settings group that owns the setting. |
string | settingId | The id of the setting. |
Returns
Type | Description |
---|---|
Binding | The binding between the property value of an object and property value of a control. |
Type Parameters
Name | Description |
---|---|
TSettingValue | The value type of the setting. |