XAF - UX Improvements for Design Time Templates, Windows and Web UI (Coming soon in v16.1)

XAF Team Blog
31 May 2016

Design-time enhancements

With our upcoming release, all XAF templates will be available from the DX Template Gallery (look for the DevExpress v16.1 Template Gallery item in the standard Add New Item... dialog or see the "Add DevExpress Item" context menu item for your projects in Solution Explorer):


Additionally, we've provided shortcuts for the most recently used (MRU) item templates to the Add DevExpress Item... menu - invoked for XAF projects under the Solution Explorer:


Notice that there is a new Non-Persistent Object item template that allows you to create non-persistent classes with ease (it contains all the required boilerplate code and example implementations of the INotifyPropertyChanged, IXafEntityObject, IObjectSpaceLink interfaces). Please review my earlier blog post to learn on more improvements with regard to managing non-persistent objects in standard XAF forms. See the Changes to Visual Studio Item Templates in XAF v16.1 KB article for more details.


WinForms SDI: Outlook-Style Navigation Integration

For those of you targeting Windows, XAF's integration of DevExpress WinForms Outlook-Style navigation controls and OfficeNavigationBar is now better than ever.

The OfficeNavigationBar can be displayed in non-compact mode, as in the screenshot above, or in the compact mode (enabled by default) demonstrated below:

You can always switch between compact and non-compact modes via the Navigation Options dialog ().

Each navigation link at the bottom of the OfficeNavigationBar panel corresponds to the root navigation group defined under the NavigationItems node.

Clicking on these group items can be include animations managed by our TransitionManager component  where the SlideFadeTransition type is used by default (view a full-size GIF without losing quality HERE):


This new feature is enabled only in SDI mode (UIType = SingleWindowSDI) with the ribbon menu (FormStyle=Ribbon) when the new RootGroupStyle property is set to OutlookSimple or OutlookAnimated. You can initialize these configurations in code or via the Model Editor:

For a cleaner UI and better end-user experience, the DockPanel previously hosting the NavBarControl was also removed. The NavBarControl is now positioned directly in the form template, which also helped us remove unnecessary borders.

The expand/collapse functions of the removed dock panel are now natively managed by the NavBarControl and the two new buttons added into the status bar. The "Normal View" button expands the NavBarControl while pressing the "Reading View" button collapses the NavBarControl.


SVG icons support in ASP.NET

In XAF ASP.NET applications, SVG images are now supported, which improves your website's appearance on displays with high pixel density (resolution).

If you're adding custom images as per this documentation article, note that image display size is determined by the svg element's viewBox attribute. Also, SVG icons are not grayed out automatically for disabled Actions. You should manually add a disabled variant of an SVG icon with the _Disabled suffix (e.g., MyIcon_Disabled.svg).

Our UX designers also started to redraw standard XAF images, but this is still in works. You can easily view already updated images in the Model Editor's image picker:

Our future plans include completing this image collection and to introduce this same capability for XAF's WinForms UI.


Faster rendering and other performance optimizations for popular Web UI scenarios

In short, the core idea for all these performance improvements in XAF ASP.NET WebForms apps is that under certain circumstances, we intentionally suppress creation and rendering of current web page controls, disable unnecessary data-binding operations, reduce the number of requests to the server and perform updates on the client side where possible. This allows us to produce a web app that behaves faster and is more responsive, which is essential for hand-held devices (e.g., tablets, smart phones). Desktop web browser users will also benefit from these changes, especially in scenarios involving popup windows.

Since several thousand of our unit and complex functional tests have passed, these optimizations are turned on by default in XAF v16.1, so that everyone can benefit from them. For backward compatibility or any unhandled issues in your custom code that might occur due to these optimizations, we also provided various static options in the DevExpress.ExpressApp.Web.WebApplication.OptimizationSettings class allowing you to turn this feature off completely (or partially). I've described these options and scenarios in the following KB Article: https://www.devexpress.com/kb=T386142 


Your feedback is needed!

As always, my team and I look forward to hearing your thoughts on each of these improvements in comments to this blog or via the https://www.devexpress.com/Support/Center/Question/Create service.

Free DevExpress Products – Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We’ll be happy to follow-up.
Gerhard Achrainer
Gerhard Achrainer

Hi Dennis. Good work, but we would really love to see the simplified navigation for the MDI template. Any chance to port that by using a custom template?

Also, I didn't find the colored bars of the "Estimated Revenue" column in your 3rd screenshot in the Demo Center. Would you please point me to a reference for that implementation?

Thanks in advance!

1 June 2016
Dennis (DevExpress)
Dennis Garavsky (DevExpress)

@Gerhard: Would you please forward me your suggestions on simplifying the current navigation for MDI at dennis at devexpress dot com (with specific screenshots, if possible)? And yes, custom controls like this can be added via the template customization: documentation.devexpress.com

As for the grid's conditional formatting, check out the www.devexpress.com/.../T291012 article for ready code examples.

1 June 2016
Alex Miller
Alex Miller

Hello Dennis,

Great job with the templates. However I've found like with most DX templates, I end up not using them because there's too much 'help comments' and removing all of them takes longer than write a new BO from scratch. I know I can create my own template, I would just like to have the option to add or not the commented help. Maybe a checkbox in the template wizard?

I agree with Gerhard about the refining if the MDI template.

Thanks,

Alex

1 June 2016
Alex Miller
Alex Miller

Also any chance we'll see C#6 updated templates and CodeRush templates? Mainly for nameof which should be used in every XPO property.

1 June 2016
Dennis (DevExpress)
Dennis Garavsky (DevExpress)

@Alex: Thanks for your comments.

>>too much 'help comments' and removing all of them takes longer than write a new BO from scratch.<<

Would you please clarify which XAF entities you create most often when developing with XAF? I am asking because there may be better solutions for you than our templates. For instance, if you need to code an XPO class, simply use the "xc" CodeRush shortcut instead of our Domain Object item template (documentation.devexpress.com). If you need to design the ViewController quickly, it is very fast to do it directly in code by writing a few lines like "public class MyClass: ObjectViewController<DetailView, Person> {}". Personally, I never use these designers and templates even for creating Actions, and I know other experienced XAFers do this as well. It is also easy to design your own template either with Visual Studio/CodeRush or whatever productivity tool you are using.

I am looking forward to hearing from you.

>> I would just like to have the option to add or not the commented help. Maybe a checkbox in the template wizard?

Thanks, we will take it into account. The main goals of these hints in item templates are 1) speed up getting started to uncomment and try working code; 2) educate people or make them more familiar with XAF features and its best practices. For the last 3 years, we also had been contacted only 3 times (you are the fourth today) on this where it caused inconveniences to experienced guys and there were several good solutions like those I described above.

>>I agree with Gerhard about the refining if the MDI template.

Would you please also clarify your point about MDI templates, because the current problems with this mode are not quite clear?

>>

Also any chance we'll see C#6 updated templates and CodeRush templates? Mainly for nameof which should be used in every XPO property.

<<

Thanks for your suggestion. Our team will take it into account. For now I see difficulties in providing several versions of templates and organizing this mass in the wizard, because we still support Visual Studio 2010, 2012 and 2013, which do not support this nameof feature. Right away, I think it is easy and best to create your own CodeRush templates for this. I have also contacted our IDE team on the CodeRush templates for XPO as regard to their Roslyn offering.

1 June 2016
Alex Miller
Alex Miller

@Dennis

>> Would you please clarify which XAF entities you create most often when developing with XAF?

I will be honest, I only use them when I create 'sample projects' for support questions/bugs. For my own project, I write my BOs and Controllers from scratch/coderush like you.

Don't get me wrong. Comments are super useful the first time and when learning. I just looked at the NonPersistentObject template and i'm glad it's commented, until I get the hang of it.

I will send you an email about the MDI stuff. This comment box is too primitive for screenshots :)

CodeRush team basically gave me the same answer a few months ago. I understand supporting 'legacy' versions, but it shouldn't stop progress. I use CR because i'm lazy, how can you expect I will create my own CR templates ;)

1 June 2016
Dennis (DevExpress)
Dennis Garavsky (DevExpress)

@Alex: Thanks for your honest answer - I hope that other experienced XAF customers also do not have real problems with this.

I forgot to mention that you are free to use the www.devexpress.com/.../Create service to post your screenshots and other clarifications on our MDI templates. Thanks in advance!

>> I use CR because i'm lazy, how can you expect I will create my own CR templates ;)

LOL:-)

1 June 2016
Saif Khan
Saif Khan

Those shortcuts are helpful. I always find myself navigating the list especially if you have 2-3 versions of DevExpress installed. True, the help comments can be eye-itching, but I've also found it useful t times. Can't a CodeRush plugin be created to remove them with a keyboard shortcut Ctrl R + H?

I like the transitions. Who says WinForm is dead? I have a very unique set of skills...I will find you. And when I do I will execute a using (MyForm myForm = new MyForm())... ;)

2 June 2016
Dennis (DevExpress)
Dennis Garavsky (DevExpress)

>>Those shortcuts are helpful. I always find myself navigating the list especially if you have 2-3 versions of DevExpress installed.

We are happy to hear you like this time-saving feature.

As for CodeRush plugin, I think it is all technically feasible, though not everyone uses CR + whether the other solutions discussed above require less efforts.

>>I like the transitions. Who says WinForm is dead?

Like VCL, it has been dying for almost a decade and I think it will "die" for another at minimum, especially with constantly improved components and vendor support.

3 June 2016

Please login or register to post comments.