Skip to main content

DocumentManagerServiceExtensions.CreateDocument(IDocumentManagerService, String, Object, Object) Method

Static extension method that creates and returns a IDocument descendant with the specified parameters.

Namespace: DevExpress.Mvvm

Assembly: DevExpress.Mvvm.v24.1.dll

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

Declaration

public static IDocument CreateDocument(
    this IDocumentManagerService service,
    string documentType,
    object parameter,
    object parentViewModel
)

Parameters

Name Type Description
service IDocumentManagerService

The type the static extension method operates with.

documentType String

A System.String value that specifies the type of the view to be created by the IDocumentManagerService.

parameter Object

A parameter passed to the view model via the ISupportParameter.Parameter property.

parentViewModel Object

An object that is passed to the view model of the created view via the ISupportParentViewModel.ParentViewModel property.

Returns

Type Description
IDocument

An object implementing the IDocument interface.

Remarks

This method creates a child View through the ViewLocator. The child View already contains a View Model. The Parameter (ISupportParameter) and ParentViewModel (ISupportParentViewModel) are passed to the child View Model. (ViewLocator, loosely-coupled View Models).

See Also