Skip to main content

LayoutControl.IsModified Property

Gets whether the layout has been changed.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[Browsable(false)]
public bool IsModified { get; }

Property Value

Type Description
Boolean

true if the layout has been changed; otherwise, false.

Remarks

The IsModified property indicates whether the layout has been changed.

After the user performs any single layout customization action in Customization Mode (e.g., drags an item to a new position, adds a splitter, renames an item, etc), this property is set to true.

The IsModified property is automatically set to false after the layout has been restored from a file in XML format, a stream or the system registry.

Example

The following example shows how you can perform certain actions after the layout has been modified by an end-user in Customization Mode. The LayoutControl.HideCustomization event is handled to check the value of the LayoutControl.IsModified property and perform these actions.

To reset the IsModified flag to false when the Customization Form is opened, the LayoutControl.ShowCustomization event is handled. The flag is reset via the interface SetIsModified method.

using DevExpress.XtraLayout;

private void layoutControl1_ShowCustomization(object sender, EventArgs e) {
    //Reset the IsModified flag when opening the Customization Form
    (layoutControl1 as ILayoutControl).SetIsModified(false);
}

private void layoutControl1_HideCustomization(object sender, EventArgs e) {
    if (layoutControl1.IsModified) {
        //Do some actions if the layout was changed
        //...
    }
}
See Also