The Windows Phone 7 project I’m working on has 2 UIs, and a core ‘engine’ of functionality with some pages that are common. I’d like my user interface to pass an object into one of these common pages in the core assembly.
Currently I can navigate to pages in the core assembly from the UI assembly. However, it is my understanding that each assembly has it’s own Isolated storage, is that correct?
If I can share Isolated storage, I can use that, I’m just not sure how to get the two assemblies to use it together.
What’s the best practice?
I tried googling this: ‘wp7 pass object between assemblies’
More Info:
This would be 1 application with two assemblies. Something like this:
CustomerUI (project)
– MainPage.xaml
– App.xaml
CoreFuncs (project)
– CustomerData.cs
– EditCustomer.xaml
SalesRepUI (project)
– MainPage.xaml
– App.xaml
Both CustomerUI and SalesRepUI would use the EditCustomer page and customerData object. So, from MainPage a CustomerData object is instantiated, then a user could click ‘Edit User’ which would navigate to the common EditCustomer.xaml page. We would want to pass in the already instantiated CustomerData object. (For the purpose of this discussion…)
Sorry, Sorry, I found what I wanted, I was thinking too hard.
PhoneApplicationService.Current.State["keyName"] = object;was exactly what I wanted. Not sure if its the best way, but for me, it works. Just throw my settings class or whatever in there, and catch it on the other side in the page.xaml code.