I have a two xaml page. I am trying to passing a list array of string from one page to another during navigation. I can easily pass the string object but not able to pass the collection object. Can anyone please help me. I have write the code as below.
First xaml
List<string> array = //contains the array of strings
NavigationService.Navigate(new Uri("/ListViewController.xaml?parameter="+array, UriKind.Relative));
Second xaml i.e ListViewController.xaml
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
string msg;
if (NavigationContext.QueryString.TryGetValue("parameter",out msg))
{
foreach (char str in msg)
Debug.WriteLine("Data "+ str);
}
}