Back to Devexpress

DocumentManagerServiceExtensions.CreateDocument(IDocumentManagerService, Object) Method

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

latest2.3 KB
Original Source

DocumentManagerServiceExtensions.CreateDocument(IDocumentManagerService, Object) Method

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

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,
    object viewModel
)
vb
<ExtensionAttribute>
Public Shared Function CreateDocument(
    service As IDocumentManagerService,
    viewModel As Object
) As IDocument

Parameters

NameTypeDescription
serviceIDocumentManagerService

The type the static extension method operates with.

| | viewModel | Object |

An object specifying the document’s View Models.

|

Returns

TypeDescription
IDocument

An object implementing the IDocument interface.

|

Remarks

This method is used when a child View is defined through the ViewServiceBase.ViewTemplate or ViewServiceBase.ViewTemplateSelector property. The child View should not contain a View Model, because it is passed through the service.

See Also

DocumentManagerServiceExtensions Class

DocumentManagerServiceExtensions Members

DevExpress.Mvvm Namespace