.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

libGdx unable to find files in android application data directory -

php - Webix Data Loading from Laravel Link -

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