0

Hi I'd like to pass arguments through pages in my application. its working with string and int. But what i want to pass is a list What I'm actually doing :

MainPage :

PhoneApplicationService.Current.State["file"] = file;
NavigationService.Navigate(
  new Uri(string.Format("/gamepage.xaml"), UriKind.Relative));

SecondPage :

file = (Elements)PhoneApplicationService.Current.State["file"];

File looks like that : Elements file

And Elements : list<Element>

Arriving my file is empty Oo. Do you know why ?


All of these classes should have their own "file"

Is you are using Eclipse it's basically making a new class.

Unless there is any information that you haven't shared with us.

You can't just put multiple classes in the same "file" (class file)

You need to create separate class files for each class you wish to have in your program.

4

1 に答える 1