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

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

Namespace: DevExpress.Mvvm

Assembly: DevExpress.Mvvm.v21.1.dll

Declaration

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

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.

viewType Type

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

See Also