1

I am making a windows phone application, and have divided my solution up in 4 projects.

  • WebService
  • MainProject
  • SecondaryProject
  • PortableLibrary

I share models between all projects using the Portable Library. But how to share information, I know I can share variables and other elements using Uri Scheme:

NavigationService.Navigate(new Uri("/Project;component/URI.xaml", UriKind.Relative));

But what if I want to parse Complex objects?

An Example with pseudo code and program flow:

**STARTUP->MainProject**
UILoad();                     //Login UI shown
MobileService.Authenticate(); //Authentication stored in Isolated storage through CreditVault.
NavigateTo->MainMenu();       //

**MainMenu->SecondaryProject**
NavigationService.Navigate(new Uri("/SecondaryProject;component/URI.xaml", UriKind.Relative)); 
MobileService.AccessRestrictedInformation(); //How to still be authenticated here?
SavePictureAndInformation();  //How to make Information available to all projects in the solution?

The authentication I have on the startupPage, allows me to automatically re-authenticate users, which is why I store it encrypted.

Questions

Can the other Project access the IsolatedStorage of the first project, if so how?

If I authenticate the user upon startup, will a created mobileservice in another project within the solution also be authenticated?

Am I missing somethine smart?

External Information

I need the setup of multiple projects with pages and cannot insert them in the same project. So it is not a solution to have it in the same project.

JTIM
  • 2,774
  • 1
  • 34
  • 74
  • 1
    Use singleton Pattern to store data. There're many way to parse complext project... You can use PhoneApplicationService.Current.State http://stackoverflow.com/questions/4953491/passing-data-from-page-to-page – Đức Bùi Mar 03 '15 at 02:37
  • I was unsure if those solutions worked across projects. My small tests did not work. But maybe there were another reason. I will try again. From your link I found: http://mikaelkoskinen.net/windows-phone-pass-data-between-pages-application-resources/ which seems like what I want. I will test it. Again Thx. – JTIM Mar 03 '15 at 09:11

1 Answers1

1

You can share information between projects using IsolatedStorage or use the application.current.resources, from this link http://mikaelkoskinen.net/windows-phone-pass-data-between-pages-application-resources/

Hope somebody find it useful :)

JTIM
  • 2,774
  • 1
  • 34
  • 74