Just Open your App.xaml file and nevigate on App.xaml.cs file.
Here is you define the variable like this:
- public partial class App : Application
- {
- public string Id { get; set; }
- public string Roll { get; set; }
- public string Center { get; set; }
- //...what ever which you want in property
-
- }
Then after defining property in App.xaml.cs just access and set the value in property in another page like this.
- public void Setvalue()// under the any function like this
- {
- (App.Current as App).Id="Somevalue";
- (App.Current as App).Roll="Somevalue";
- (App.Current as App).Center="Somevalue";
- }
Then after setting the value of property access on another page like this.
- public void Getvalue()// under the any function like this
- {
- string id=(App.Current as App).Id;
- string id=(App.Current as App).Roll;
- string id=(App.Current as App).Center;
- }