Log In
[Expand]General Information
[Expand]WinForms Controls
[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
[Collapse]eXpressApp Framework
 [Expand]Getting Started
 [Expand]Design-Time Features
 [Collapse]Task-Based Help
  [Expand]Business Model Design
  [Collapse]Application Model
    How to: Allow an Administrator to Create Custom Persistent Fields in an XPO-Based Application
    How to: Apply Application Model Changes to the Current View Immediately
    How to: Apply HTML Formatting to Windows Forms XAF UI Elements
    How to: Create Additional ListView Nodes in Code using a Generator Updater
    How to: Enable the Administrative UI for managing Users' Model Differences
    How to: Extend the Application Model
    How to: Merge End-User Customizations into the XAF Solution
    How to: Store the Application Model Differences in the Database
  [Expand]List Editors
  [Expand]Property Editors
  [Expand]Scheduler and Notifications
  [Expand]Miscellaneous UI Customizations
  Frequently Asked Questions (FAQ)
 [Expand]API Reference
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
This documentation page describes implementations made in our v17.2 release cycle. To learn about functionality shipping with v18.1, navigate to our updated help file experience at docs.devexpress.com. Learn More

How to: Apply Application Model Changes to the Current View Immediately

This topic describes how to implement Actions that make changes in the Application Model and then apply these changes to a current View without recreating it.


Mobile applications do not support UI customization without recompilation, so the approach described in this topic is not supported by the Mobile platform.

In the Action's SimpleAction.Execute event handler, save the Frame's View (Frame.View) object to a variable and then unlink the View from Frame by passing null (Nothing in VB) to the Frame.SetView method. After that, make the required changes to the Application model, call the View.LoadModel method with the false parameter and then set the saved View back to the Frame using another overload of the SetView method taking the view parameter. The Controller below implements two Actions (SwitchMasterDetailMode and SwitchEditor) that illustrate this pattern.

Expanded See Also

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