Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Collapse]eXpressApp Framework
 [Expand]Fundamentals
 [Expand]Getting Started
 [Expand]Concepts
 [Expand]Design-Time Features
 [Expand]Functional Testing
 [Expand]Deployment
 [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]Actions
  [Expand]Navigation
  [Expand]Views
  [Expand]List Editors
  [Expand]Property Editors
  [Expand]Templates
  [Expand]Filtering
  [Expand]Reporting
  [Expand]Dashboards
  [Expand]Scheduler and Notifications
  [Expand]Maps
  [Expand]Security
  [Expand]Workflow
  [Expand]Localization
  [Expand]Testing
  [Expand]Miscellaneous UI Customizations
 [Expand]Frequently Asked Questions
 [Expand]API Reference
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
[Expand]End-User Documentation

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.

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

How would you rate this topic?​​​​​​​