With XAF v16.2.4, you can apply Application Model changes to a View without recreating it. To do this, save the Frame's View to a variable and then unlink it from the Frame by passing null to the SetView method. After that, make the required changes to the model, call the LoadModel method with the false parameter and then set the saved View back to the Frame using the SetView method. Here is the generic code illustrating this pattern:
View view = Frame.View;
if(Frame.SetView(null, true, null, false)) {
// Make required changes with the model here.
// ...
view.LoadModel(false);
Frame.SetView(view);
}
This video also illustrates how it works in the application UI in action.
Leave a comment if this is something you are going to try right now!
As always, please report any issues using the https://www.devexpress.com/ask service. Thanks in advance!
Happy birthday Dennis.
ReplyDeleteThanks, Chris!
Delete