mvvm - WPF Prism Updating ViewModel -
i new prism wpf world, have 1 simple question.
i have registered view , viewmodel in module initialise method below
var navigatorview = new navigationmenu.view.navigationbarview(); navigatorview.datacontext = m_container.resolve<navigationmenuviewmodel>(); var regionmanager = m_container.resolve<iregionmanager>(); regionmanager.regions[regionnames.navigationmenuregion].add(navigatorview);
now if want modify viewmodel way able through viewmodel class only, there other way can update viewmodel object registered unity container. know how can object instance registered unity container.
thanks , regards, harry
any of vms or modules should have initialize-method, gets container, regionmanager , eventaggregator objects passed via parameters. in first place (like bootstrapper) put them in containers. use method registertype this. can objects resolve method, did in code example.
this means, wherever want manipulate specific vm use resolve vm. didn't understand question correctly. please explain little further, or bit more specific got problems.
Comments
Post a Comment