.net - Injection of ViewModels without a Service Locator -


i think service locator anti-pattern, find common see "viewmodellocator" each view takes datasource in xaml-based applications.

how avoided?

you can use mvvm framework uses conventions, caliburn.micro. in caliburn, register viewmodel di container when app starts. when have testview automatically bound testviewmodel (convention name, framework looks viewmodel in di container, gets/creates instance , binds it.).


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -