Access Kanzi Studio user preferences. More...
Public Member Functions | |
| object | GetSetting ([NotNull] string settingKey) |
| Gets the value of a project-independent user preference setting. | |
| T | GetSetting< T > ([NotNull] string settingKey, T defaultValue) |
| Gets the value of a project-independent user preference setting. | |
| void | SetSetting ([NotNull] string settingKey, object value) |
| Sets the value of project-independent user preference setting. | |
Events | |
| EventHandler< UserPreferenceSettingChangedEventArgs > | SettingChanged |
| Raised when a user preference setting is changed. | |
Access Kanzi Studio user preferences.
Use the IUserPreferences interface to store project-independent settings for your Kanzi Studio window plugins. For example, you can set the style or size of the icons in your plugin.
Gets the value of a project-independent user preference setting.
| settingKey | The key of the setting. |
Examples
To get the value of a project-independent setting:
| T GetSetting< T > | ( | [NotNull] string | settingKey, |
| T | defaultValue ) |
Gets the value of a project-independent user preference setting.
Performs the type cast internally. If the value is missing or cannot be casted, returns the supplied default value.
| T | The expected type of the value. |
| settingKey | The key of the setting. |
| defaultValue | The value to use when failing to get the expected value. |
Sets the value of project-independent user preference setting.
Replaces a possible existing value.
| settingKey | The key of the setting. |
| value | The value of the setting. |
Examples
To set the value of a project-independent setting: