And example demostrates best. Click the Button on this example three times to demonstrate:
<App>
<JavaScript>
var Observable = require("FuseJS/Observable");
var max_pos = Observable(10000);
var pos = Observable(2000);
var show = Observable(false);
function clicked (data) {
show.value = !show.value;
}
module.exports = {
pos: pos,
max_pos: max_pos,
show: show,
clicked: clicked
};
</JavaScript>
<StackPanel>
<Text Value="{pos}" />
<Text Value="{max_pos}" />
<WhileTrue Value="{show}">
<Slider Value="{pos}" Minimum="0" Maximum="{max_pos}" />
</WhileTrue>
<Button Text="Click ME!" Clicked="{clicked}" />
</StackPanel>
</App>