Wpf application variable not changing
- by Hasan Zubairi
In my application I need some variables on almost all the pages so I declared them in Application.xaml like
<sys:String x:key="First">First</sys:String>
and on one page I change the value in code like
Resources["First"] = "This is First";
on the second page when I call the variable like
String f = (string)this.TryFindResource("First");
MessageBox.Show(f);
the out put is "First" and not "This is First". I also tried like.
Application.Current.Properties["First"]