Part 26: Saving User Preferences

Download this episode

Download Video

Description

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

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image
      Ariel

      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
      BobTabor

      @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
      jaimer

      @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
      Merin

      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?

      Merin

       

    • User profile image
      BobTabor

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

      http://social.technet.microsoft.com/Forums/en-US/winserver8gen/thread/146134b4-20c8-4f66-b24e-45e3dfab55c4

      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
      BobTabor

      Opening comments

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.