Passing parameters among views in a navigation frame INSIDE a custom control
Posted
by NetWriter
on Stack Overflow
See other posts from Stack Overflow
or by NetWriter
Published on 2010-05-23T19:36:17Z
Indexed on
2010/05/23
19:41 UTC
Read the original article
Hit count: 154
silverlight-3.0
|navigation
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?
© Stack Overflow or respective owner