locked
Writing a brush, color or local resource to roaming settings.

    Question

  • I'm fairly new and have been looking all over for the exact procedure for this type of thing, but have so far only found references for saving values to Local/RoamingSettings. I'm working in c#/xaml

    Basically I am attempting to read a RGB color from three sliders and write them to a custom color and staticresource. I have that part working but I also want to write it to RoamingSettings so that it persists nicely across devices. Unfortunately, I can't find a way to get RoamingSettings to accept a color or local resource. Any help is greatly appreciated.



    Saturday, April 12, 2014 7:04 PM

Answers

  • See Quickstart: Roaming app data for a general overview.

    You cannot save the Color object directly, but you can extract the ARGB values from your Color and serialise them as a string.

    --Rob

    • Marked as answer by tdemerse Saturday, April 12, 2014 11:19 PM
    Saturday, April 12, 2014 7:52 PM
    Owner

All replies

  • What language are you using so we can get you to the right forum?

    --Rob

    Saturday, April 12, 2014 7:41 PM
    Owner
  • Well that's embarrassing. I'm working in c#/xaml. Thanks for the reply.
    Saturday, April 12, 2014 7:44 PM
  • See Quickstart: Roaming app data for a general overview.

    You cannot save the Color object directly, but you can extract the ARGB values from your Color and serialise them as a string.

    --Rob

    • Marked as answer by tdemerse Saturday, April 12, 2014 11:19 PM
    Saturday, April 12, 2014 7:52 PM
    Owner
  • As I had feared. For now I have just linked each slider to a setting. That allows me plenty of flexibility until I write some code to streamline it to one.

    Thanks again

    Saturday, April 12, 2014 11:21 PM