expressappframework-devexpress-dot-expressapp-dot-view-37b9d3d7.md
Provides access to information on a View, which is stored in the Application Model.
Namespace : DevExpress.ExpressApp
Assembly : DevExpress.ExpressApp.v25.2.dll
NuGet Package : DevExpress.ExpressApp
public virtual IModelView Model { get; }
Public Overridable ReadOnly Property Model As IModelView
| Type | Description |
|---|---|
| IModelView |
An IModelView object representing the current View’s Application Model node.
|
Use this property to get the current View‘s properties which are stored in the Application Model as attribute values.
By default, the Model property is set when a View is created.
To learn how to customize the Application Model, refer to the Extend and Customize the Application Model in Code help topic. To learn how to use the Application Model in code, refer to the Access the Application Model in Code help topic.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Model property.
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.
if(isDefaultViewSelected) {
UpdateDefaultSettings(savedView.Model);
isDefaultViewSelected = false;
IModelVariant newModelViewVariant = ((ModelNode)rootModelViewVariants).AddNode<IModelVariant>(newViewVariantId); // Adds a new child node of the IModelVariant type with a specific identifier to the parent IModelViewVariants node.
newModelViewVariant.View = ((ModelNode)modelViews).AddClonedNode((ModelNode)View.Model, newViewVariantId) as IModelView; // Creates a new node of the IModelView type by cloning the settings of the current View and then sets the clone to the View property of the view variant created above. Beware of the specificity described at Q411979.
newModelViewVariant.Caption = parameter.Caption; //Sets the Caption property of the view variant created above to the caption specified by an end-user in the dialog.
See Also