Set a Settings Charm property element from a custom XAML file to a new value.


win8_settingscharm_set_xaml_property(entryName, elementName, propertyName, newValue);

Argument Description
entryName The name of the option in the settings charm.
elementName The name of an element in the xaml.
propertyName The property name of the element.
newValue The new value for the element.

Returns: Boolean


With this function you can set a given element property in your custom Settings Charm fly-out. The entryName is the name of the option in the Settings Charm, as specified by the first argument of the function win8_settingscharm_add_xaml_entry, while the elementName is the name of the element to set the value of as defined in the XAML file. The propertyName must be a string and is defined in the XAML file, following the Microsoft guidelines found here, whiole the newValue is the value that you wish to give the element.


var text = win8_settingscharm_get_xaml_property("Settings", "IntroText", "Text" );
win8_settingscharm_set_xaml_property("Settings", "IntroText", "Text", "MacSweeney Games Is Best");

The above code will get the "text" value of the XAML property "IntroText" and then change it to something else.

Back: Windows 8
Next: win8_settingscharm_get_xaml_property
© Copyright YoYo Games Ltd. 2015 All Rights Reserved