[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Expand]Controls and Libraries
 [Collapse]Common Features
  [Expand]Data Binding Common Concepts
  [Expand]Data Source Wizard
    File and Folder Browser Behaviors
    Persistence Behavior
    Indicator Behaviors
    Stub Glyph Behavior
    Banner Behavior
    Drag And Drop Behavior
    Magnifier Behavior
    Pager Navigation Behavior
    Snap Window Behavior
  [Expand]Application Appearance
  [Expand]Filtering UI Context
  [Expand]High DPI Support
  [Expand]Scaffolding Wizard
  [Expand]Formatting Values
   HTML Text Formatting
  [Expand]Tooltip Management
  [Expand]Saving and Restoring Layouts
   Clipboard - Copy and Paste Operations. Data Formatting
   Version Compatibility: Default Property Values
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Persistence Behavior

A persistence behavior restores the last known position and size of a target DevExpress form. The following animation illustrates an example.

Optionally, the behavior can also restore layouts of all supported controls owned by the target form.

Supported controls

Behavior options

  • Storage - allows you to select whether target control settings should be stored in a registry or as a local storage file.
  • Path - a path to the file or registry key where target control settings should be stored. By default, this path is <executable file folder>\<target control name>Layout.xml. Note that the behavior will be unable to work as expected if the path is not set. The code sample below illustrates how to set a registry key for the layout.
  • StoreChildLayouts - when this option is enabled, the behavior saves and restores layouts of all supported DevExpress controls located on the target form.

Is this topic helpful?​​​​​​​