Passing parameters among views in a navigation frame INSIDE a custom control
- by NetWriter
I created a silverlight 3 application with a navigation frame and 3 views: search, add and edit.
I used the app file to pass parameters among the 3 pages, eg:
((App)Application.Current).SNIPSELECTED = currentSnip;
Then in the receiving page:
currentSnip = ((App)Application.Current).SNIPSELECTED;
currentSnip is a SnipItem object:
public class SnipItem
{
public string itemID {get;set;}
public string category {get;set;}
public string itemDescription {get;set;}
public string codeSnip {get;set;}
}
This worked fine until I decided to make this entire application into a user control and put that inside a second silverlight application with its own navigation frame and app file.
The app files are getting confused. The first app file with all my parameter passing is not being read.
I know how to pass a simple parameter between views in the first application without the app file (in a query string), but how about these custom types like my currentSnip above?