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

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -