CodePlexProject Hosting for Open Source Software
Is there a way to send arguments to a view while creating it ?
I have a scenario where the cmd1 and cmd2 ... create the same view with diff params which than doesn't change for its lifetime
I hope it is supported ?
If you need to send manual parameters then is there any reason why defining them within your View's constructor does not meet your needs?
Are you using Dependency Injection within your View's Constructor?
I use serviceLocator.GetInstance<T>() to create an instance, cannot pass arguments that way
I would prefer to create instances via prism/MEF but cant figure out a way
Have you considered using RegionManager.RequestNavigate? This enables you to load a view into a region and pass in parameters in a uriquery. The View/ViewModel being navigated to then implements INavigationAware and in the NavigatedTo (or
IsNavigationTarget or NavigatedFrom) method you can extract the uri parameters from the NavigationContext object. I use this technique and it works well.
There is more info on this technique in the Navigation chapter in the MSDN Prism documention. Take a look here
http://msdn.microsoft.com/en-us/library/gg430861(v=pandp.40).aspx and look for the section titled
Passing Parameters During Navigation.
Hope this helps.
thanks, will look into it
there are no wpf quickstarts for either Navigation & the machines here are tightly locked & cannot install the SL developer rutime, will look for wpf tutorials
Are you sure you want to delete this post? You will not be able to recover it later.
Are you sure you want to delete this thread? You will not be able to recover it later.