Hi All,
thanks for all the huge responses.
This time i am having a problem in styles.
I have to styles.i want them to get loaded them dynamically on fire of an event like combo. when i select user defined theme1 then all the controls takes the styles of theme one and when i select theme2 then all the controls takes the respective styles. i am able to set the style for one style as well as i am able to use all the silverlight theme dynamically.but for selecting and setting a particular theme i dont know how to do that.
Some body pls help.
i have written this code below and finding an exception which say
"An item with the same key has already been added".
void GetThemes(string s)<br />
{<br />
StreamResourceInfo sri = Application.GetResourceStream(new Uri(string.Format("Test;component/{0}.xaml",s), UriKind.Relative));<br />
StreamReader sr = new StreamReader(sri.Stream);<br />
XElement element = XElement.Parse(sr.ReadToEnd());<br />
List<Theme> themeSettings = new List<Theme>();<br />
IEnumerable c1 = from el in element.Elements() select el;<br />
<br />
foreach (XElement ele in c1)<br />
themeSettings.Add(new Theme { Key = ele.FirstAttribute.Value, Value= ele.ToString() });<br />
IsolatedStorageSettings.ApplicationSettings.Add(string.Format("{0}Theme",s), themeSettings); <br />
}
the exception comes in the last line ie
IsolatedStorageSettings.ApplicationSettings.Add(string.Format("{0}Theme",s), themeSettings);