Skip to main content
.NET 6.0+

ISupportStoreSettings.SetSettings(IModelTemplate) Method

Creates and/or provides access to child nodes of the Application Model‘s Template node where customizations made by an end-user must be stored. To apply these customizations, this method calls the ISupportStoreSettings.ReloadSettings method.

Namespace: DevExpress.ExpressApp.Templates

Assembly: DevExpress.ExpressApp.v23.2.dll

NuGet Package: DevExpress.ExpressApp

Declaration

void SetSettings(
    IModelTemplate settings
)

Parameters

Name Type Description
settings IModelTemplate

An IModelTemplate object that represents the Application Model’s Template node, providing settings for the current Template.

Remarks

When a Template is created, the customizations previously made by an end-user must be applied to the Template’s controls (form state, toolbar state, etc.). For this purpose, the SetSettings method is invoked. This method must create and/or provide access to child nodes of the Application Model’s Template node which is passed by the settings parameter. Then, this method should call the ISupportStoreSettings.ReloadSettings method to apply the settings stored in the accessed(created) nodes to the Template’s controls.

When invoking the Model Editor at runtime or closing a Window, the changes made by an end-user must be saved to the Template node’s child nodes. For this purpose, the ISupportStoreSettings.SaveSettings method is called.

Physically, the customizations are stored in the Model.User.xafml file. When a Template is created, the Template node customizations from this file are passed to the SetSettings method to be applied to the Template. So, if you remove this file, the Template node structure must be recreated by the SetSettings method.

Note

UI customizations can be saved in Windows Forms applications only.

See Also