c# - MVVM viewmodel reference view -


i required use mvvm pattern. know viewmodel should not care view been reading. result don't know how solve problem:

i have dll turns textbox , listview autocomplete control:

somedll.initautocomplete<string>(textbox1, listview1, someobservablecollection); 

anyways don't know how call method viewmodel using mvvm patter. if reference controls in view braking rules.

i new mvvm pattern , company requires me follow it. appropriate way of solving problem?

i know able solve passing entire view viewmodel constructor parameter totaly break mvvm pattern because need reference 2 controls in view.

what you're doing here pure view concern, i'd recommend doing in view (i.e. code-behind). view knows vm , observable collection, why not let code behind make call?

(i'd recommend seeing if can non-code/xaml api "somedll", have no idea how control might have on that)


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -