Silverlight / WPF - How to use query string in SL MVVM

Asked By gopal krish on 05-Jun-12 08:20 AM
hi..

how to use query string in silver light page using mvvm ?


need ur suggestions with examples..

regards
gopal.s
Jitendra Faye replied to gopal krish on 05-Jun-12 08:24 AM
reference from-

http://stackoverflow.com/questions/5586507/silverlight-querystring-alternative




public class ApplicationContext


{

#region Declarations

// Static instance of the application class.
private static ApplicationContext _instance;

#endregion

#region Constructor

public ApplicationContext()
{
}

// Static instance creator.
public static ApplicationContext Instance()
{
if (_instance == null)
{
_instance = new ApplicationContext();
}
return _instance;
}

//Shared properties e.g. Is available between all views
public SecurityContext UserContext { get; set; }
}

To use from a view:

 CurrentUserContext = ApplicationContext.Instance().UserContext;

Hope this will help you. 

Jitendra Faye replied to gopal krish on 05-Jun-12 08:27 AM
Try this link also- 

http://stackoverflow.com/questions/6020081/mvvm-silverlight-and-page-navigation


Here also you will get example for this.

hope this will help you.