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. 
    // ... 

You can find a full ViewController code for accomplishing the two most popular WinForms scenarios benefiting from this capability in the 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 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:

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-

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.

Friday, January 20, 2017

How to replace XAF exception handling with Logify

I would like to promote a KB article on the subject, which I published yesterday right after receiving a customer request in response to the recent DevExpress Logify: a New Exception Reporting Tool  blog post.

The XAF article describes three typical ways to integrate Logify into an XAF app. Here I want to note that while the third option with a custom trace listener may look a bit complicated now, it is possible that the Logify team will come up with a built-in trace listener in the future (at least I talked about this with the responsible team and they also said that they thought about such an option). This way you will be able to plug-in this listener in an XAF app using a few lines in the configuration file or in code as per How to: Create and Initialize Trace Listeners (MSDN).

We would greatly appreciate it if you inform us of which XAF integration approach (# 1,2,3 or any other) you eventually implemented in your project and how it all worked for you. Thanks in advance!

XAF WinForms v16.2.3 - Beware of exceptions when executing a ParametrizedAction (e.g. FullTextSearchAction) with TabbedMDI and Ribbon UI

I want to draw your attention to the T462973 - RibbonControl - NullReferenceException is thrown in the RibbonItemViewInfoCalculator.CalcEditItemViewInfo method issue already fixed in the XtraBars Suite for v16.2.3 and which XAF WinForms users might encounter after upgrading to v16.2.3. The number of users who already hit this exceeded a certain threshold, and the known issues section in the What's New documentation or manual searching the Support Center may not help effectively discover it yourself. Frankly speaking, we are a bit late with this warning, but it is still better to post this here to widely inform those who have not yet upgraded their XAF/WinForms projects to v16.2.3.

You can find more details and solution instructions in this article.

Please accept sincerely apologies from our XAF and XtraBars teams for all the inconvenience here.