WPF MVVM - how to inject a service into the ViewModel I created a dialog service for this (which in essence is a simple wrapper around the System Windows MessageBox) and I'd like to use it throughout my application
Dependency Injection in a WPF MVVM Application - DevExpress Blogs To access this service from the view model, use the techniques described here: Services -> Getting Started A complete example for this topic is available here: How to use DevExpress Services with Dependency Injection
MVVM and service pattern - Software Engineering Stack Exchange I'm building a WPF application using the MVVM pattern Right now, my viewmodels calls the service layer to retrieve models (how is not relevant to the viewmodel) and convert them to viewmodels I'm using constructor injection to pass the service required to the viewmodel
Create a Custom Service | WPF Controls | DevExpress Documentation This topic describes how to create a custom service if predefined services do not suit your requirements If you need to implement the logic that should access a UI element in the View Model code, you can use the UIObjectService instead
Dependency Injection to Page ViewModels in WPF All you need to do, is to inject the page view models e g into another view model Bind them to a ContentPresenter and define an implicit DataTemplate which targets the type of the page view model