Part 26: Saving User Preferences

Play Part 26: Saving User Preferences
Sign in to queue


In this lesson we use the ToggleSwitch element to capture a user's preference on how to deal with remembering the state of the app prior to it being terminated.  We talk about the different special folders and objects we can use to save user data, and discuss roaming and how to utilize it in our app.


Download the entire series' source code



Download this episode

The Discussion

  • User profile image

    I noticed the ToggleSwitch uses white when the app theme is dark and black when the theme is light. I've search all over the place but nobody seems to know how to force the ToggleSwitch to appear black even if the app theme is black (changing the Foreground to black only changes the On/Off label). Can you help me (and probably others) with this issue?

    Thanks you!

  • User profile image

    @Ariel: I'm sorry, I couldn't find anything either.  The best I know to do is re-style the entire control, and I've yet to need to do that so I would need to just dig into the details.  Expression Blend might be your friend here ... I know it's possible to see more information w/r/t the individual stylings of things for implicitly set styles of controls and windows using Blend -- here again, I personally haven't done it.  Let me see if I can get someone else to help respond to this.

  • User profile image

    @Ariel, bob is right that you will need to tweak the template. With Blend this will be straight forward.  I am guessing the brush you are looking for in the template is ToggleSwitchThumbBackgroundThemeBrush ..  I recommend you alter the template and replace it (instead of altering the brush).. but either will work, just make sure you do it within the scope that only alters your controls (with this brush it might be safe since it is very specific to toggleswitch

  • User profile image

    Hi Bob,

    I got the RoamingStorageQuota value of 0 instead of 100. The OS on which I am developing is Windows Server 2012 64 bit. Could this quota be different because of different OS?



  • User profile image

    @Merin: Hmm... very interesting ... see this:

    There seem to be conflicting reports here ... but either:

    (1) Windows Store Apps are not supported at all in Windows Server 2012, or ...

    (2) It's a UAC issue, or ...

    (3) The OS is not properly activated? or ...

    (4) ... ??? ... you've got me ... honestly, I didn't think you could build / run Windows Store Apps using Visual Studio on Windows Server 2012.  So, you're further along than I am at this point.

    Did any of that help?  Let me know if you figure this out.

  • User profile image

    Opening comments

Add Your 2 Cents