Skip to main content
.NET 8.0+

IModelDetailView.FreezeLayout Property

Specifies whether the automatic update of the Detail View layout is disabled.

Namespace: DevExpress.ExpressApp.Model

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

Declaration

[ModelBrowsable(typeof(NotNewNodeVisibleCalculator))]
bool FreezeLayout { get; set; }

Property Value

Type Description
Boolean

true, if the automatic update of layout is disabled; otherwise, false. The default is false.

Remarks

By default, the Detail View layout is updated automatically in the following cases:

  • when you make changes in the business model (for example, add a new property to the business class);
  • when you modify the same Detail View layout at a lower Application Model layer (for example, you modify layout in the MySolution\Module project and the layout is automatically updated in the MySolution\Blazor.Server, MySolution\Win, and MySolution\Web projects).

Set the FreezeLayout property to true to prohibit automatic updates of the layout. In this instance, only manual modifications will be allowed.

Layout_FreezeLayout

Note

The FreezeLayout property is not available for nodes that you have added or cloned at the current Application Model layer. Layout of these nodes is never updated automatically.

When you set the FreezeLayout property to true, the Model Editor copies the current state of the layout to the model differences. As a result, any changes from lower layers (e.g., default layout generation) are overridden. When you revert the FreezeLayout back to false, Model Editor resets differences - all current layout customizations are removed.

Note

After manually customizing the layout of a business class View, you must set the FreezeLayout property to true if you plan to introduce additional properties to the business class later. If you do not set the property to true, the layout may become corrupted after introducing new business class properties. In this scenario, based on the layout rules, the layout generator may create a default layout that differs greatly from the original default layout. After applying your manual layout customizations stored in the Application Model differences file, the resulting layout will also be completely different from the original layout. The resulting layout may even become corrupted. To prevent this, always set the FreezeLayout property to true before introducing new business class properties if you have previously customized the default layout. Generally, any changes to the BO class may affect the layout generation - the FieldSizeAttribute attribute on string type properties, the Aggreagted attribute on reference type properties, the ExpandObjectMembersAttribute attribute, etc.

See Also