c# - How to invoke View methods from ViewModel using ViewModel-First approach -


i developing wpf application architecture based upon model-view-viewmodel pattern principles, using mvvm light toolkit framework.

the following xaml code example of view-viewmodel relation:

<... .resources>    <datatemplate datatype="{x:type viewm:mediaelementviewmodel}">        <view:mediaelement/>    </datatemplate> </... .resources> 

i know possible invoke view methods viewmodel using view-first approach, assigning mediaelement instance's datacontext property when constructing concrete mediaelement, unfortunately not solution me.

view methods, example, mediaelement, such play(), pause(), focuse() or other "pure" ui methods.

thanks lot.

your view model referenced view has no intrinsic knowledge or access of it.

your suggested methods being show , close, simple handle via view model binding visibility property.

other concepts may of use data triggers allow update view through animated behaviours, set properties or trigger many conditions.


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Website Login Issue developed in magento -

Can the constants be defined inside a model file of a framework in PHP? -