Back to Devexpress

XafApplication.FindModelView(String) Method

expressappframework-devexpress-dot-expressapp-dot-xafapplication-dot-findmodelview-x28-system-dot-string-x29.md

latest3.2 KB
Original Source

XafApplication.FindModelView(String) Method

Provides access the Application Model node that defines a specified View.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public virtual IModelView FindModelView(
    string viewId
)
vb
Public Overridable Function FindModelView(
    viewId As String
) As IModelView

Parameters

NameTypeDescription
viewIdString

A string value that specifies the identifier of the View to be found in the Application Model.

|

Returns

TypeDescription
IModelView

An IModelView object that represents the Application Model node that defined the View specified by the viewId parameter.

|

Remarks

Use this property to customize a particular Application Model node. This property returns the node whose ID attribute is set to the value specified by the viewId parameter.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FindModelView(String) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

XAF_Non-Persistent-Objects-Edit-Linked-Persistent-Objects-Demo/CS/EFCore/NonPersistentEditEF/NonPersistentEditEF.Module/Controllers/NonPersistentObjectActivatorController.cs#L34

csharp
if(shortcut != null) {
    var model = Application.FindModelView(shortcut.ViewId);
    if(model is IModelDetailView && string.IsNullOrEmpty(shortcut.ObjectKey)) {

See Also

FindModelView(String)

XafApplication Class

XafApplication Members

DevExpress.ExpressApp Namespace