navigate to another page with an object uwp c#
// On the corrent page
public class RestaurantParams
{
public RestaurantParams(){}
public string Name { get; set; }
public string Text { get; set; }
// ...
}
var parameters = new RestaurantParams();
parameters.Name = "Lorem ipsum";
parameters.Text = "Dolor sit amet.";
// ...
Frame.Navigate(typeof(PageTwo), parameters);
// On the page you want to get to
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
var parameters = (RestaurantParams)e.Parameter;
// parameters.Name
// parameters.Text
// ...
}
Also in C#:
- What is a class in c#
- sort c#
- const float c#
- visual c#
- c# loop string array
- unity face direction of movement
- instantiate object in circle
- c# variable
- c# arraylist contains
- unity clamp rotation
- c# or
- c# unity max
- c# new dictionary linq
- percentage in c#
- unity how to end a game with esc
- get and set for array c#
- C# Unknown column 'FundAllocation' in 'field list
- change label text size wpf C#
- asp.netcore: develop on win10 run on ubuntu
- c# skip following code in loop
- wait without pause anything else unity
- how to randomly rotate rigidbody of object in unity
- how to get specific length of row in matrix c#
- how to convert int to string unity c#