Skip to main content

ViewInjectionManagerExtensions.Inject(IViewInjectionManager, String, Object, Func<Object>, String) Method

Static extension method that injects a ViewModel (and its View) with the specified parameters.

Namespace: DevExpress.Mvvm

Assembly: DevExpress.Mvvm.v23.2.dll

NuGet Packages: DevExpress.Mvvm, DevExpress.Win.Navigation

Declaration

public static void Inject(
    this IViewInjectionManager service,
    string regionName,
    object key,
    Func<object> viewModelFactory,
    string viewName
)

Parameters

Name Type Description
service IViewInjectionManager

The type the static extension method operates with.

regionName String

A System.String value specifying the region name.

key Object

An object specifying the identifier (key) of the View and its ViewModel.

viewModelFactory Func<Object>

A object encapsulating the method that returns the ViewModel.

viewName String

A System.String value specifying the view that will be created using the ViewLocator.

See Also