Get the current value of Settings Charm property element from a custom XAML file.


win8_settingscharm_get_xaml_property(entryName, elementName, propertyName);

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.

Returns: String


With this function you can get the current value (as a string) from a given property that you have added to your XAML 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 get the value from as defined in the XAML file. The propertyName must be a string and is defined in the reference for that control following the Microsoft guidelines found here.


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_remove_entry
© Copyright YoYo Games Ltd. 2015 All Rights Reserved