I have been looking through the Shoppping example and in particular the implementation of the ChangeDefaults flyout.
I want to expose some of my application wide settings via the Settings charm and a flyout. However, I want to automatically save my settings when the flyout is dismissed. - I presume this is the standard practice.
The shopping example exposes a SAVE button to trigger the Save Command. How could I trigger this command without the Save Button on the screen?
Thanks for your help
In order to execute the Save
handler when the flyout is dismissed, you could configure and override the
method for handling the
event that the SettingsFlyout
throws when it becomes hidden.
Therefore, instead of handling the Save
command, the OnLostFocus()
method would execute when the
is dismissed and the Flyout's OnLostFocus
event is raised. Adding the
implementation into the OnLostFocus()
override method would work as desired.
For more information, you may refer to the followings MSDN
I hope this helped you,