SavedSetting
Description
Every widget has the ability to save some configuration data to disk as a set of Key/Values. A SavedSetting is the building block to use to read and write these settings.
Attributes
- DefaultValue [string]: The default value to use when no saved data is found.
- Input [string input]: The block that will provide the value to save.
- Name [string]: The name of the saved setting. This is used as the key to save the setting. Please note that this name (like all other names) has to be unique across the widget.
- StringChanged [event]: Event raised when the string has changed.
Example
1 <!-- The following code will save the text entered in a VisualTextBox to disk. The next time the widget is started, the textbox will still contain this value. The first time the widget is started, the text "Default" will be entered. -->
2
3 <SavedSetting Name="savedtext" DefaultValue="Default" Input="textbox"/>
4
5 <VisualPage>
6 <VisualContent>
7 <VisualTextBox Name="textbox" Input="savedtext"/>
8 </VisualContent>
9 </VisualPage>
