Search This Blog

Monday, October 17, 2016

Welcome the EnableMultipleBrowserTabsSupport feature toggle for an XAF Web app - YOUR FEEDBACK IS NEEDED

Starting with v16.1.8+, we have made improvements for a quite popular ASP.NET scenario - working with several independent XAF views within tabs of the same web browser instance. Previously, it was not easily possible as the XAF web site stored the information about the current main window within the ASP.NET session between requests (learn more...). Technically, it still does, but now each loaded web window has a unique identifier by which all its requests are correctly routed on the server.

Now, with the new EnableMultipleBrowserTabsSupport feature toggle for your Web application, you can, for instance, include hyper links to two different XAF views into a customer email, and clicking these links subsequently would result into opening two separate browser tabs with the ability for an end-user to work with them independently.

To test this functionality in your Web project, do the following:
1. Install this hot fix build (or any other v16.1.8+ build when the link stops working);
2. Modify the YourSolutionName.Web/Global.asax.cs file to set the static WebApplication.EnableMultipleBrowserTabsSupport  property to True in the constructor or the Application_Start method. For instance:

namespace XCRM.Web {
    public class Global : System.Web.HttpApplication {
        public Global() {
            DevExpress.ExpressApp.Web.WebApplication.EnableMultipleBrowserTabsSupport = true;

So far, our tests were pretty stable, and we have not found any issues in standard XAF Web scenarios. We still want to collect more feedback and hear from you about how this works in your real projects. The more scenarios we cover at this stage, the better for the product. Take special note that this will still be in the preview state in XAF v16.1. If all goes according to plan and if nothing serious is found, this functionality will be officially released in the upcoming 16.2 build, which should be out around early December.

See the

Thursday, October 13, 2016

How to map Actions to a certain RibbonPage and RibbonGroup via the Application Model

This is my second post about advanced ribbon menu customizations in XAF WinForms apps. This time I want to repost two possible solutions for the aforementioned task after reviewing and updating the code of one good (and never old - Hi, Noxe!:-)) customer recently. This work was done after an interview about my Simplifying customization of Action controls - YOUR FEEDBACK IS NEEDED! post. Take a look at it if you haven't yet. 

Long story short, refer to the ticket and find two possible Controller implementations. Even though the first one (RibbonFromModelWithEventController.cs) requires more code to implement, I like it more, because it does not require you to create an Action Container node manually in the Model Editor. With the first one, you just specify the TargetRibbonPage and TargetRibbonGroup properties for a required Action under the ActionDesign node and you are done:

In any case, I suggest you play with both implementations and watch the attached video to determine what is more suitable for you. I look forward to hearing from you in the comments section or in the Support Center, as always.

I do not want to focus much on the Controller code itself, just want to note that there we extended the standard IModelAction interface corresponding to the ActionDesign | Action node and then handled these new options in our code. This is one of my favorite Application Model features, which is also truly loved by our customers. In fact, everything you see in our framework is built using the same simple principle: you have certain UI metadata or settings store and have some Controllers in modules that create/customize visual controls accordingly. To learn more about this, refer to the Concepts > Application Model > Extend and Customize the Application Model in Code article in our online documentation. This is a really cool feature and it can help you create a more reusable code.

Wednesday, October 5, 2016

How to place all nested View commands into the main ribbon and activate them based on the selected layout tab

My next two posts will be devoted to advanced ribbon menu customizations in WinForms, which become much easier to implement with the introduction of the new Ribbon and Standard templates (WinApplication.UseOldTemplates = False) back in v14.2 and also API changes in the recent XAF versions.

The current post is about mapping ALL Actions from the nested Frame toolbar into the main ribbon menu by creating a separate page. It is planned that when you activate a certain nested ListView within a layout tab, its related View commands will be activated in a separate ribbon page as well (context-dependent commands). This somewhat exotic approach was requested a few times by different customers and is likely dictated by users who have a habit of using only the main ribbon menu, i.e., without moving the mouse to the bottom context.

The two pictures showing how it was before and after making necessary code changes + a video showing everything in action are worth a thousand words in communicating this effect in the real app.
Context-dependent Actions in ribbon