Search This Blog

Thursday, February 23, 2017

How to refresh View appearance after making changes to the Application Model in code

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);
}

You can find a full ViewController code for accomplishing the two most popular WinForms scenarios benefiting from this capability in the https://www.devexpress.com/kb=S173664 article (switching a ListView editor type and MasterDetailMode). 
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!


Thursday, February 16, 2017

Enhanced High DPI support in WinForms XAF applications - YOUR FEEDBACK IS NEEDED!

In this post, I will describe how to make your WinForms XAF application look much better if your Windows 7, 8 or 10 is configured to show text and other items larger (150-200% or more which is a usual setting on High DPI (4K) display devices).



The following animation demonstrates the difference between the default and DPI-Aware scaling: http://i.imgur.com/Kgv4geP.gif

This functionality is already available in the most recent XAF update (16.2.4). However, there are several High DPI related bugs that we have fixed after this release. That is why I recommend you to download this hotfix before trying High DPI: DevExpressComponents-16.2.4.17046.exe

In this hotfix, the DPI-aware scaling is already enabled in XAF demos and design-time tools.



Proceed to see how to enable it in your applications.

Thursday, February 2, 2017

New and updated help topics in version 16.2.4

Recently, Dennis has published a huge list of changes introduced in XAF documentation in the previous major update (16.2). In this post, I would like to overview another set of changes in XAF documentation introduced with the 16.2.4 minor update of XAF.