Back to Devexpress

DocumentManagerServiceExtensions.CreateDocument(IDocumentManagerService, String, Object) Method

corelibraries-devexpress-dot-mvvm-dot-documentmanagerserviceextensions-dot-createdocument-x28-devexpress-dot-mvvm-dot-idocumentmanagerservice-system-dot-string-system-dot-object-x29.md

latest2.6 KB
Original Source

DocumentManagerServiceExtensions.CreateDocument(IDocumentManagerService, String, Object) Method

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

Namespace : DevExpress.Mvvm

Assembly : DevExpress.Mvvm.v25.2.dll

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

Declaration

csharp
public static IDocument CreateDocument(
    this IDocumentManagerService service,
    string documentType,
    object viewModel
)
vb
<ExtensionAttribute>
Public Shared Function CreateDocument(
    service As IDocumentManagerService,
    documentType As String,
    viewModel As Object
) As IDocument

Parameters

NameTypeDescription
serviceIDocumentManagerService

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.

| | viewModel | Object |

An object specifying the document’s View Models.

|

Returns

TypeDescription
IDocument

An object implementing the IDocument interface.

|

Remarks

This method uses the ViewLocator to create a child View and passes the specified View Model to the created child View. (ViewTemplate and ViewTemplateSelector, tightly-coupled View Models).

See Also

DocumentManagerServiceExtensions Class

DocumentManagerServiceExtensions Members

DevExpress.Mvvm Namespace