Save settings

dekempeneer
dekempeneer used Ask the Experts™
on
I have a path like :
<Path x:Name="Path01" Width="566.04" Height="567" Canvas.Left="2.1123" Canvas.Top="0.853088" Stretch="Fill" StrokeThickness="1" StrokeLineJoin="Round" Stroke="#CD000000" Fill="#CD4A5F6F" Data="...... "/>
With a button I can change the Fill-property to another color eg #CD000000, but how can I save this change of color so it uses this new color again when the window is restarted (eg after a log off log on)
Please provide me with all the details and if needed some code, I have no idea on how to do this best so.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
you can save your color in registry and load and modify your string automatically at programstart

Author

Commented:
?
Commented:
You'll want to use something called Isolated Storage in your code behind.  This is kind of like cookies for Silverlight applications.

More details here: http://silverlight.net/learn/quickstarts/isolatedstorage/#key_value_pairs

This page show's code similiar to the following:
// Create an instance of IsolatedStorageSettings.
private IsolatedStorageSettings userSettings =
    IsolatedStorageSettings.ApplicationSettings;

// Add a key and its value.
userSettings.Add("PathFillColor", "#CD000000");

// Read a value using its key.
String color = userSettings["PathFillColor"];

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial