Search This Blog

Wednesday, November 27, 2013

New learning materials on the security system and middle-tier application server

Our team has recently created several help articles on the subject, which you may find helpful, as they describe certain configuration aspects in greater detail:

How to: Implement a WCF Application Server and Configure a Client Application for It
How to: Connect to the WCF Application Server from Non-XAF Applications
How to: Use the Integrated Mode of the Security System in Non-XAF Applications
How to: Configure Permissions to Allow Linking/Unlinking of Read-Only Objects
(find even more in our Task-Based Help...)

Let me know whether you like these additions and what other things you wish to learn more from us. We will be glad to consider them for the future.

Thursday, October 31, 2013

XPObjectSpace performance improvements (when processing large amounts of data)

The XPObjectSpace class was improved to speed up CRUD manipulations with large amount of data, e.g. for data import scenarios. In particular, creation and update operations are now ~ 50% faster than before (confirmed by 5 runs on 10K typical records from our FeatureCenter and MainDemo apps).

*Exact percentage in your end application may vary depending on the complexity of a business model, the number of processed records and other factors.

This feature request was suggested by several customers (1, 2) and I hope you will find this helpful as well. For instance, it may be helpful for data import, especially if a lot of records are process.

Tuesday, October 22, 2013

Русскоязычное сообщество DevExpress XAF разработчиков

На днях добрые люди подкинули ссылку на недавно самоорганизовавшееся сообщество, где собираются русскоязычные XAF пользователи и делятся своим опытом. В частности там есть представители наших давних заказчиков и партнеров из DevPark и Galaktika.  Поэтому уверен, что всем, кто использует DevExpress XAF и еще при этом говорит и понимает по-русски, будет интересно вступить в эту группу:!forum/russian-devexpress-xaf

чтобы, так сказать, других посмотреть и себя показать: обсудить что-то, поделиться накопленным опытом, спросить совета и др.

Надеюсь, что достаточно много наших узнает об этой группе и всем будет полезно и интересно:

Пользуясь случаем, хочу напомнить о нашем корпоративном блоге на Хабре, так что там тоже можно общаться, узнавать новости о наших продуктах на русском, а также задавать вопросы и получать ответы от сотрудников DevExpress.

Кстати, получить больше информации о других сообществах вокруг DevExpress XAF можно тут:


Thursday, October 17, 2013

Guess the feature by screenshots;-)

This is something we are currently working on for the next major release (check out this blog to learn more). I hope that this one is quite easy to guess as this feature should address one the popular requests from our customers.

I am looking forward to your answers in comments!;-)

Wednesday, October 16, 2013

A custom PropertyEditor for syntax highlighting

Today I saw a similar request from a customer, so I wanted to take this moment to remind the community about a custom PropertyEditor that resides in our Feature Center demo (there you can find technical how-to examples for countless scenarios):

Technically, this CSCodePropertyEditor is a descendant of the built-in WinPropertyEditor class, which uses our RichEditControl and its services to nicely display a text saved within a System.String property of a persistent class. I hope this small customization example will once again help you see that you can implement any custom UI in your XAF app. Want to learn more on this, check out the eXpressApp Framework > Concepts > UI Construction and related help articles or contact support. Thanks!

Thursday, October 10, 2013

Update to the E2106 example about highlighting the focused editor in DetailView

Today I have refactored and also slightly changed the Web part of the E2106 example + updated the whole description to make it easier for XAF users to understand this solution and implement it in their projects.

Tuesday, October 8, 2013

Managing data from the associated details collection via a checked list box control

Here is one more contribution from the XAF community - a new Property Editor developed by the international company Galaktika as part of their XAFARI business platform (learn more about these guys in my introductory post). This editor can replace the built-in ListPropertyEditor in certain business scenarios, especially if you want to save more space on your data form.

Here are some screenshots for you to better understand the functionality I am talking about:

Configuration in the Model Editor

Result in the WinForms UI

You can download this reusable solution from (13.1.7 build is available!)

Friday, October 4, 2013

Update to a custom lookup editor for working with referenced properties via a simple drop down list

I have just updated one of my Code Examples that shows how to work with referenced properties via a simple drop down list instead of the standard LookupPropertyEditor. Technically, I built a custom WinForms Property Editor that is based on the LookUpEdit control from our XtraEditors library. This is what it looks like:

Today in addition to some minor refactorings and bug fixes, I added a button that enables you to open the associated record directly from the editor + localizable tooltips for other editor buttons.

BTW, I think that a similar feature would be helpful for the built-in LookupPropertyEditor, since it is more visible to end-users than a magic Control+Shift+mouse click shortcut. Plus, a similar feature already exists in the Web version.

Feel free to download this update, report bugs (if any) and let me know your other thoughts on this.

Thursday, October 3, 2013

Incorrect way of instantiating Controllers in your custom code

I am posting this to help you avoid the subject and strange side effects with standard and custom Controllers in your applications while writing custom code. I am inspired by a customer who had a strange issue with non-working validation logic triggered by the the OK Action in a custom dialog window. The funny thing is that it all worked when the same dialog window was invoked via the standard PopupWindowShowAction instead of writing custom and configuring ShowViewParameters manually. Fortunately, I  knew what the problem is even without looking at the dialog window invocation code, which was really incorrect because of the following line:

DialogController dc = new DialogController();

It appears to be fully correct at first glance, but this is wrong, because by instantiating a Controller class this way a user left it unaware of the Application Model and other important XAF environment, which is responsible for many things like localization, validation, etc. As a result, no validation settings for the OK Action were taken into account...

The fix is also very easy: 

DialogController dc = this.Application.CreateController<DialogController>();

Tuesday, October 1, 2013

How to generate a sequential and user-friendly identifier field within a business class

I have just created a new Code Example that demonstrates a very simple solution for the subject:

"Orders, articles or other business entities often require that you have user-friendly Id or Code fields that end-users can memorize and use during phone conversations. They are usually sequential, but some gaps can be allowed as well (e.g., when an order is deleted). Refer to this StackOverFlow thread for more information on this common scenario, and a possible implementation."

Check out for a step-by-step instruction on how to implement this. 

It is based on the DistributedIdGeneratorHelper class from the DevExpress.Persistent.BaseImpl library (I know that many of you have already been using it for years).
I hope you will like this simple, but quite powerful solution, which can be considered as an alternative to the How to generate and assign a sequential number for a business object within a database transaction, while being a part of a successful saving process (XAF) example. 

Thursday, September 19, 2013

A Gentle Introduction to XAF - Watch the webinar recording on YouTube

Watch the recent webinar (~1h 20m) made by Seth Juarez (Analytics PM at DevExpress) a couple of days ago.
eXpressApp Framework (XAF) was something new for Seth until this July when we seated together  for 4 days to help him learn the product architecture, its features and specifics and eventually build a basic XAF app from scratch. Seth is a fast learner and very good speaker, so I believe you will enjoy watching this webinar recording and learning more about Seth's experience and getting a better understanding of what XAF essentially is and how it can help your development.

Even if you are not new to XAF, I still recommend watching this, because first, it is a chance to have some fun - thanks Seth!:-) and probably hear of some framework aspects you have not yet tried or figured out well.

Monday, September 9, 2013

DevExpress.Xpo.v13.1.Extensions is now available for WCF Data Services 5.6

I forgot to inform you of the newly added support for WCF Data Services 5.6 in XPO, which you may be interested in (download a patch with this support included) if you are using our OData extensions that allow you to expose your XPO data model and work with it via OData protocol (check my previous blogs to learn more on this).

Microsoft is baking and selling new WCF Data Services versions like hot cookies lately, so we need to follow and provide separate versions of our OData extensions quite often for our customers:

Friday, August 30, 2013

How to easily prevent clearing a lookup field value?

This post is devoted to one more usability improvement in version 13.2

Usability - Make it possible to hide the Clear Action via the application model

In particular, our customers wanted to make it possible to easily hide the Clear Action in lookup Property Editors and thus disallow end-users to clear values for certain fields.

Previously, it was already possible to implement this task in code, but it required writing two platform-dependent Controllers. For instance, in WinForms you could find the LookupWindowController and deactivate its ClearAction in code. As for the Web, you could find a required ASPxLookupPropertyEditor and update the ClearingEnabled property.

Now we simplified it to setting a single AllowDelete property for a required LookupListView node via the Model Editor:

Take special note that after this customization in WinForms app your end-users will not be able to leave the lookup value empty via the Control+Delete shortcut supported by our XtraEditors.

Of course, this also works on the Web:

Although this is not the only way to implement this scenario (e.g., you could also use validation rules here), I hope you liked this small usability improvement. Please let me know your thoughts in comments.

Beware of issue with custom wizards in the Model Editor property inspector

I would like to pay your attention to the Model Editor - Custom editors invoked from the property inspector did not save any value issue, which you may encounter in the version 13.1.6
Basically, it may prevent you from modifying model properties like ImageName, Criteria, Filter, EditMask, Settings and others, which use wizards instead of plain editors in the property inspector

Note that it is still possible to change a property value by typing it manually, i.e. without using wizards:

Good news is that we have already fixed this problem and you can
download a patch from here.
In any event, let me take this moment to apologize for all the inconvenience here.

Friday, August 23, 2013

System XAF controllers are now categorized within the documentation for easier access

I have recently asked our tech writers to implement the subject, because this way it will be much easier for developers to find a required Controller to customize or extend by just looking at the category instead of not very meaningful technical name:

Do you find this small usability improvement helpful?

Thursday, August 22, 2013

Wizards - XAFARI way

I wanted to inform you about another bright contribution from the XAF community - a new Wizards module developed by the international company Galaktika as part of their XAFARI business platform (learn more about these guys in my introductory post).

Here are some screenshots for you to better understand the functionality I am talking about:

Configuration in the Model Editor

 Result in the Web UI

Result in the WinForms UI

How to prompt when the user is about to exit a WinForms application

Today I improved  the implementation one of my WinForms examples by changing the code and also by adding functional tests powered by our EasyTest engine.

This example is about displaying confirmation message when the main application window is being closed by a user to avoid accidental closure of the whole application and losing all opened screens:

You might remember this behavior from many browsers, which ask you under similar circumstances.
This is not rocket science (just a single WindowController for you to add), but probably your end-users will appreciate it.

The functional test is also quite straightforward and easy to understand for regular human beings:

Wednesday, August 21, 2013

Building a Simple Contact Application with XAF

It seems that all of my peers in the US (Oliver, Paul, Julian, etc.), are interested in XAF recently:-). Please check the latest blog from  (a PM for DevExpress Analytics division - follow him on Twitter at @sethjuarez):

Building a Simple Contact Application with XAF

I hope you like it and find it helpful, especially if you are not using XAF yet and considering its benefits for one of your future LOB apps. BTW, a more detailed and comprehensive getting started tutorial can be found at 

Monday, August 19, 2013

XAFARI 13.1 is available

I am back from a short vacation, and I would like to inform you that XAFARI - a business platform from Galaktika Corp has recently been updated to the version 13.1.5 of XAF:

You can learn more on what is new in XAFARI 13.1.5 from

If you like the new and existing XAFARI features, do not hesitate to like their page on FB:

I should remind that the English version of the XAFARI web site is still under construction (I believe the more users feedback this XAF extension gets, the sooner the site will be finished), but the built-in Google Chrome translation from Russian to English will help you understand most of the info - at least that works for me;-)

Friday, August 2, 2013

Webinar: What's Coming in XAF 13.2 (08/20/2013 )

Join Julian Bucknall and members of the DevExpress XAF team as we discuss the new features currently in development and expected to ship as part of our Universal Subscription v13.2.

Do not miss other DevExpress webinars at  

Thursday, August 1, 2013

Quick Access Navigation on the Web

I just would like to remind you about a feature that currently exists only in XAF Web UI, but which is for some reason is rarely used by customers (at least from what I see in the Support Center while helping other customers). Please refer to the attached screenshot:
Does it look familiar to you?
If not, then please refer to the XAF documentation to learn more about the IModelNavigationItem.QuickAccessItem property. You can set it via the Model Editor for a required navigation item while configuring the navigation system under the NavigationItems node.
Technically, these items are rendered by the QuickAccessNavigationActionContainer class placed within the default web page template.

Hope, I will see this small feature more often in your apps from now. As for the Win UI, you may be interested in tracking the Navigation - Allow end-users to mark certain navigation items as favorite  ticket, which is a more general request.

Wednesday, July 31, 2013

The CollectionsEditMode option gets more flexible

Let me quote myself from the 

"Starting with the version 13.2, you will be able to control this behavior vis-a-vis the DetailView via the CollectionsEditMode property exposed in the Model Editor for Web projects:
<Views> <DetailView Id="Contact_DetailView" CollectionsEditMode="View"></DetailView> </Views>

The above setting in the XAFML file will enable the View mode only for the Contact DetailView, while the rest application will use the default mode or the one specified in code:
protected override void OnLoggedOn(LogonEventArgs args) { base.OnLoggedOn(args); ShowViewStrategy.CollectionsEditMode = ViewEditMode.Edit; }

Personally, I love when working on something big small things like this one get attention and are resolved. I hope you like this too:-)

Monday, July 29, 2013

Developing the new Reports module

You are probably aware that we have a very popular feature request for our XAF Reports module:

Reports - Make it possible to easily use XtraReports designed in Visual Studio.

It is primarily about allowing you to easily reuse regular XtraReports created in Visual Studio in an XAF application

I must say that nothing has already prevented you from displaying regular reports in XAF in exactly the same way as you would do in a non-XAF app, but of course the XAF reporting is not only about that: our built-in module also integrates reports into the application navigation and menu systems, enabling end-users to create reports at runtime and store them in the database, adds the Show In Report command to list and detail forms, as well as adding many other features requested by our customers.

I wanted to inform you that the aforementioned request is planned for version 13.2, and we are currently working on it.

Here is a very short overview of the new features:

Short vs Long View identifiers in version 13.1 (MUST READ)

Let me quote myself from the Core - Introduce an ability to have two or more classes with one and the same name, but declared within different assemblies thread:

"After receiving customers feedback, we decided to change our original implementation (it exists in versions 13.1.3-13.1.5 only) to completely avoid a breaking change here for existing customers (optionally refer to the Core - Make it possible to find a View node by its short identifier ticket for more details on the consequences of the previous change and conflict resolution options).

So, starting with version 13.1.6 the generation mechanism will stay unchanged (short identifiers like Customer_ListView will be used), while having the capability to resolve a name conflict in advanced scenarios (see the updated description of this thread).

According to all our estimates (tickets in the Support Center and other stats), the number of people migrated to version 13.1 and who already started using long identifiers should be small. 

If you already migrated your app to 13.1, it will be required to change long identifiers to short ones after 13.1.6 is out and ONLY in places where you compared View.Id == "MyObject_ListView" in code (the rest should be automatically resolved!). We do not think that it should affect many developers (we only had a single customer call as of now), because the previous conflict resolution options we introduced should cover 95% of cases. 

If you are upgrading your app to version 13.1.6 directly, no changes will be required from you at all. In any event, if you experience any difficulties with this upgrade, our Support Team will be happy to help you resolve all problems.

I want to thank you all customers who provided their great feedback during this time and also want to apologize for all the inconvenience here."

Here is what you can do if you encounter such a naming conflict in your app:

Saturday, July 27, 2013

Developing the validation warnings feature - Feedback is needed!

You probably saw my recent post about the feature we are developing for 13.2. This nice addition to the framework was welcomed by the XAF community and there were some questions from customers which I would like to answer here. So, let's do it!

Q1: Chris G. Royle It's difficult to see from the screenshots how you've implemented Dennis. If you've used the snippet that Tolis posted recently in a blog,
A1: No, we have not used the eXpand Framework implementation.
Take special note that a validation warning rule is declared as follows:

[RuleCriteria("RuleWarning", DefaultContexts.Save, @"IsWarning = false", SkipNullOrEmptyValues = false, ResultType=ValidationResultType.Warning)]

You can learn more about our implementation from these short videos:

Winforms:  Unable to display content. Adobe Flash is required.

Friday, July 26, 2013

About profiling memory leaks...

I want to pay your attention to this Support Center ticket, because here I was involved in memory profiling with my colleague, and also because I remember that some time ago somebody from the XAF community asked to elaborate more on the memory profiling process. 

I doubt this info will be interesting for experienced developers, but we should not forget that there is a large number of people who are using XAF and who love it because it helps them to care less about the underlying technology and what happens behind the scenes.

Hence, my colleague and I wrote a detailed explanation of how we profiled a case when a report preview window is opened and then closed. So, let me quote us from that ticket:

"In fact, it is not guaranteed that the CG will be called automatically after a period of time.
During the normal application life cycle, GC may not be called at all, unless its garbage collection is forced by the CLR.
You can learn more on how the GC works at

Now please let me elaborate on how we find memory leaks in .NET apps internally.
For example, you may want to check for memory leaks when a report preview is shown.

Here are the steps you would perform:

Monday, July 22, 2013

Guess the feature by screenshots;-)

Yes, you are right, and let's be honest that it was quite easy to guess:-)
I am referring to the Validation - Warn end-users about mistakes/inconsistencies without preventing them from saving changes request, which we are currently working on, and hope to include a solution into the standard XAF delivery in 13.2 (no exact promises, as always!)

Thursday, July 18, 2013

Improving ASPxLookupPropertyEditor tab stop behavior

The approach from this article is now obsolete. See the update below.

Today I made the ASPxLookupPropertyEditor a bit more usable with regard to how it handles the tab stop (yes, again!). Thanks to the customer who drew my attention to this scenario.

If you are reading our docs from time to time:-), then you are probably well-aware that this Property Editor can render different controls based on whether the search functionality is required or not:

Let me quote the Built-in ASP.NET Property Editors help article for more details:

The ASPxLookupPropertyEditor creates either an ASPxLookupFindEdit or ASPxLookupDropDownEdit.
The ASPxLookupFindEdit is created when the Search functionality is required. This occurs in two cases. First, when the number of objects to be displayed exceeds the value of the IModelOptions.LookupSmallCollectionItemCount property of the Application Model's Options node. Second, when the LookupEditorMode property of the BOModel | Class | Member node or the corresponding Views | DetailView | Items | PropertyEditor node is set to AllItemsWithSearch or Search. For details on the Search functionality, refer to the How to: Add a Search Action to Lookup Property Editors and Link Pop-up Windows topic.
ASPxLookupDropDownEdit is created when the Search functionality is not required. 

Tuesday, July 16, 2013

Skipping tab stop for disabled/readonly editors and columns

I've recently refactored (for XAF 13.2) the WinPropertyEditor, DXPropertyEditor and a few descendants to provide a common code for updating the control's availability (technically the System.Windows.Forms.Control.Enabled property) and also added support for skipping tab stop if the control is disabled. Check out the video below to see how it works in action (take special note that the FullName property is readonly):

Unable to display content. Adobe Flash is required.

Reordering enumeration values by setting the Index property under the Localization | Enums node

I would like to let you know about another usability improvement I have recently committed.

Starting with version 13.2, you will be able to configure the order of enumeration items in the Model Editor under the Localization | Enums | <Your Enumeration> node by setting the Index property as shown in the attached screenshot:

Previously, these values were sorted alphabetically by the caption, and it was only possible to customize this order in code by accessing the underlying editor and customizing its items collection. This had to be done differently for both Windows and the Web due to the differences between these platforms. So, I hope you can see how this small improvement can save your time since you will be able to enable it in platform-agnostic module.

Monday, July 15, 2013

Providing predefined values in the property inspector for a custom application model attribute

As you probably know, XAF Application Model is flexible enough to allow you to extend it to store own UI and behavior options (learn more...) for all users or individually. Today I would like to spent a few minutes to show you one of the possible approaches to provide default values for your custom options.

Let's consider a real-life scenario, which I believe many of you deal with in XAF: you create a validation rule via the Model Editor and specify the TargetContextIDs property to tell XAF when to check it:

Technically, there is a string property declared in the IRuleBaseProperties interface:

        string TargetContextIDs { get; set; }

Our goal is to provide a drop down editor in the property inspector (instead of the plain text box) to be able to choose the predefined "Save" or "Delete" strings instead of typing them manually.

One of the possible solutions is to use the standard .NET Framework TypeConverter mechanism. I should explicitly note that there are many other possible solutions for the same in XAF, and I just would like to describe this one because of its simplicity and popularity even outside of our framework.

Basically, I will perform the two simple steps:

1. Create a custom TypeConverter by descending from the standard StringConverter class and overriding a couple self-explanatory methods (learn more...):

public class DefaultValidationContextsConverter : StringConverter {
        public override bool GetStandardValuesSupported(ITypeDescriptorContext context) {
            return true;
        public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) {
            return new StandardValuesCollection(Enum.GetNames(typeof(DefaultContexts)));

2. Mark the required model element property with the TypeConverterAttribute passing my custom converter as a parameter:

        string TargetContextIDs { get; set; }

That's it.

You can see what we are after in the screenshot below:

BTW, this small improvement will be available starting with in the next minor update (13.1.6), and it should improve usability for beginners in this scenario.

If you know about other scenarios in our framework where usability can be tuned, do not hesitate to let us know as we will be glad to see to it.

Alternative solutions
Depending on your business requirements it would be possible to achieve the same or similar effect using other techniques:
1. a custom UITypeEditor;
2. DataSourcePropertyAttribute/DataSourceCriteriaAttribute;
3. Domain Logic,
to name just a few.  I hope to talk through them in the future when I have some time.

Tuesday, July 9, 2013

A possible way to improve the ergonomics of a large and complex detail form

When something gets very complex and there is no space for all the info on the screen (imagine a form with 300 text boxes and other controls on it - yes, I saw such forms in my life!)  you can use various techniques to temporarily hide or completely remove certain info (probably rarely used) or allocate it in a way it will occupy less space.

Many container UI elements like tab controls, panels and our layout control are designed to help you with this task. Talking about XAF apps, the most popular way of accomplishing this I saw was putting unwanted fields behind the tab groups, which were activated by end-users on demand:

This approach does not involve any refactoring of your underlying data model, but just means re-layouting the default form in a way where most often used data appears on top while having less popular data hidden. It seems that this all comes from trying to mimic the behavior and look & feel of legacy apps or even papers, because many end-users might be accustomed to such a UI in the past.

Another, but less popular approach I saw was in refactoring a huge data model, which technically means aggregating similar data into a separate part, adding a reference to it from the main object and then showing a separate detail form on demand, e.g. via a button in the toolbar. A perfect example of this can be our ObjectPropertyEditor that can be used for an aggregated reference property and that displays a nice UI for editing its details:

Today, I would like to show you an alternative way of solving the problem of complex detail forms usability. I am double excited about this solution, because it comes from our XAF customer, Sergey Zaycev and his team from Galaktika, whom I recently blogged about.
These guys implemented a custom Property Editor - TabbedDetailPropertyEditor (check this help link to learn more on how it is possible to create such extensions yourself), which is essentially a tree-like navigation panel at the left side and a detail panel on the right. Each node in the tree represents a small portion of data, which is then displayed on the right side as user focuses it in the tree:

This hierarchy is fully customizable at runtime, thus allows you to meet the needs of a very demanding client right in front of his/her PC.

In my opinion, this is a very good alternative to the standard approaches described above. If you think about it, you may find the analogy with how the main application navigation works. Of course, this displaying a small portion of data at a time also works faster and thus is more usable.

I liked this idea very much, what about you?

If you liked this stuff, then I suggest you learn more on it as well as check out other XAFARI platform features at

Wednesday, June 26, 2013

DevExpress XAF Training class in Germany (October 7-11)

I'd like to repost this good news for people who want to become an XAF expert in a few days, literally.

"The next class is a European event: October 7-11 for XAF, in a new location in Germany. I will teach this myself, and the class will be in English language as usual - important to stress in Europe!

 XAF Training Event (Europe)
This class covers the eXpressApp Framework as completely as possible in the timeframe. The target is to enable you to create your own XAF based applications, and to answer any questions you have. XAF is a large product that includes many modules and targets two different platforms - the one-week timeframe of the course is the only limit on the depth of coverage!" - learn more on how XAF can help your business to build good-looking and powerful apps for both Windows and the Web in minutes:

Monday, June 17, 2013

What's New In DevExpress Documentation? (PING!)

I would like to draw your attention to the recent documentation updates, because as you know, not only product features themselves are valuable, but also good documentation that details how to use them in practice, improving your skill set and making you more productive.

Concerning XPO, I suggest you checking this link as it will make you more fluent in using the ORM Data Model Wizard, OData and other design time features:

As for XAF, check out this update to learn about new elements which you might have not used in the past:

If you want to improve your mastery for other DevExpress products, check out the full list of recent documentation updates here.

We constantly update our documentation and examples, so do not forget to check the What's New documents from time to time, because it lists more than new product features and fixed bugs.

Thursday, June 13, 2013

What are the MOST used extra modules in your XAF solutions?

We are currently in the process of the 13.2 release planning, and I would love to get a more direct input you.
We'll use this information to better prioritize requests in our features backlog, in addition to the figures and stats we already have.
So, I highly appreciate your taking time to submit your feedback.

This first survey poll we will be fully devoted to the built-in extra modules.

QUESTION: What are the MOST used extra modules in your XAF solutions?


I would ask you to focus on the ones you use MOST of the time, e.g., from project to project, and not occasionally.  You can find the list of XAF extra modules here, just in case you forgot their names:-)

Hopefully, many of you have Facebook accounts nowadays. I think that it is worth to continue this experiment if there will be a lot of different participants. I'll also keep in mind to test-drive our LinkedIn developers group (which is quite active recently) or other means, if the FB does not work well.

Do not forget to like our official XAF/XPO page (it's quite new), if you happen to be on FaceBook and like our framework and its services:-)
From this page you can regularly receive latest news about our frameworks and also participate in various surveys and discussions with other XAF developers.

See another poll from the eXpand Framework team:

Poll - Which of the following eXpand modules/features do you use most?

Friday, June 7, 2013

Advanced (JQuery UI-based) Tooltips for Detail View Items on the Web

I would like to announce another community contribution from an active XAF customer (Thanks Krzysztof!):

What it looks like?
Here is what it looks like in an XAF Web app:

Main features 
Below is the list of supported features set by the author:

- is easy defined
- uses jQuery and jQuery-ui tooltip
- supports html tags
- has no character number limit (as in standard IE browser dialog)

Example of use:

Set an attribute on your entity property:

    [Tooltip("This is a sample tooltip from an <br/><br/>(some BR tags)<br/><br/><br/><br/>attribute")]

Or set a text in Model.DesignedDiffs.xafml (in a detail view layout item).

Learn how it is implemented!
The author also carefully documented the signification source files that form this solution and you can see this info in the "Significant files" section on the contribution page.

For you to learn how this works from the XAF perspective, let me make a short dissection of his solution:

1.  As you know, XAF allows you to customize built-in UI elements or replace them with your own versions. The Views Layout on the Web is powered by the WebLayoutManager, which renders Property Editors and  other View Items defined in the Application Model in the UI using web controls and ITemplate objects. Here a custom ITemplate was created for the layout item by inheriting from the built-in LayoutItemTemplate class (see more...).

2. To tell XAF to use this new custom layout item template, the WebLayoutController class was created (see more...): it just set a property the WebLayoutManager.
Find more details on this in the DevExpress Support Center.

3. Since the solution was originally created for version 12.1, the author implemented his own ToolTipAttribute and Application Model extenders (see more...). This is is NOT required in the latest XAF versions, because XAF provides the built-in ToolTipAttribute and corresponding properties in the Application Model. Just in case you would want to define a custom attribute for decoration of business class properties in code or configuring it via the Application Model, you can see how the XAF's attribute is implemented (see at "C:\Program Files (x86)\DevExpress\DXperience 12.2\Sources\DevExpress.ExpressApp\DevExpress.ExpressApp\DevExpress.Persistent.Base\Attributes.cs" ):

4. The latter part is important, but does not require much commenting as it is standard for ASP.NET development:
  • SampleProject.Web\Default.aspx, DefaultVertical.aspx, Dialog.aspx - modified head section
  • SampleProject.Web\scripts\jquery-ui.min.js (new)
  • SampleProject.Web\scripts\jquery.min.js (new)
  • SampleProject.Web\style.css (new)
I just want to say that in the latest XAF versions you will have to apply the aforementioned changes after adding a custom ASP.NET templates per these instructions from the XAF documentation.

Hopefully, this bright contribution will be recognized by other community members and added into the eXpand Framework ( by default.

Happy XAFing and contributing, as always!

Wednesday, June 5, 2013

Discussing UI customization in XAF by example of customizing controls associated with Actions on the Web

One of the ways to access and customize controls associated with Actions on the Web is to inherit from the ProcessActionContainerHolderController class. It represents a base class from which Controllers (there is a number of standard descendants) customizing Action Container controls are derived.

For instance, imagine that we want to enable scrolling of large menu items in our Web application and want to use the following feature of our DevExpress ASP.NET menu control: ASP.NET Menu Scrolling - today I had a real customer wanting to perform this customization.

So, you can consider using the following example code in version 12.2+:

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Actions;
using DevExpress.ExpressApp.Web.SystemModule;
using DevExpress.ExpressApp.Web.Templates.ActionContainers;
using DevExpress.ExpressApp.Web.Templates.ActionContainers.Menu;
using DevExpress.Web.ASPxMenu;

namespace MainDemo.Module.Web.Controllers {
    // This is a demo controller that builds an Action with a lot of items in the UI.
    public class Class1 : ViewController {
        public Class1() {
            SingleChoiceAction dropDownMenuAction = new SingleChoiceAction(this, "Test", DevExpress.Persistent.Base.PredefinedCategory.View);
            dropDownMenuAction.ItemType = SingleChoiceActionItemType.ItemIsOperation;
            for (int i = 0; i < 100; i++) {
                dropDownMenuAction.Items.Add(new ChoiceActionItem("Test" + i.ToString(), i));
    // This is our descendant of the standard controller to access and customize controls of a required Action.
    public class EnableScrollingMenuItemsController : ProcessActionContainerHolderController {
        protected override void OnActionContainerHolderActionItemCreated(WebActionBaseItem item) {
            MenuActionItemBase menuItem = item as MenuActionItemBase;
            if (menuItem != null && menuItem.MenuItem.Menu is ASPxMenu && menuItem.Action.Id == "Test") {
                // Accessing the ASPxMenu control and customizing it according to the DevExpress ASP.NET documentation.
                ((ASPxMenu)menuItem.MenuItem.Menu).EnableSubMenuScrolling = true;

That's it and we can now run our test app (I used our MainDemo) to see the result:

What we might have learned here?

  • Controllers can be used to implement custom features in XAF, e.g. to customize a certain UI element, to change your application's flow and implement custom end-user interaction;
  • XAF provides a number of built-in Controllers and Actions that are used when generating the default UI. For instance, CRUD, validation, navigation and search features are powered by Controllers;
  • It is possible to create custom Controllers derived from built-in ones to customize the default UI generation and behavior.
  • The default XAF UI is built at runtime and consists of regular controls using the standard development techniques. The only specificity of XAF is that it focuses on reusing code where possible - think of it like about building your application from custom user controls to avoid duplicate work.
  • In XAF, you can access a required UI element or control and customize it using the approaches you are accustomed to in the traditional development with WinForms or ASP.NET frameworks. See one, two, three topics in our docs for more customization examples.

Monday, June 3, 2013

Protecting individual data fields by criteria

As you probably know, XAF comes with a built-in security module that provides ready-to-use solutions for protecting sensitive information on the table, row and field levels (check to learn more...).

I think you will be interested to know that the version 13.1 should bring an improvement in this regard - an advanced field-level protection mode that would allow you to secure individual fields rather than the whole data record by criteria (track this ticket...).

I just wanted to provide a quick update for XAF developers as we decided to keep this item Active for now, until more demos and complete documentation is available on this feature. Currently (in 13.1), we will only have a small demo in the SecurityDemo app for you to play:

You can see the configuration for this scenario in the Updater.cs file:

// Member By Criteria Operation Permissions
securityDemoRole.AddMemberAccessPermission<MemberByCriteriaSecurityObject>("Name", SecurityOperations.ReadWriteAccess, "[Name] <> 'No Read Access Object'");
securityDemoRole.AddMemberAccessPermission<MemberByCriteriaSecurityObject>("Property1;ReferenceProperty;Oid;oid", SecurityOperations.ReadWriteAccess, "[Name] = 'Fully Accessible Property Object'");

    "[Name] = 'Read-Only Property Object'"

We will officially announce this feature and mark the corresponding feature request as Closed once we are done with the learning materials. Please stay tuned!

Wednesday, May 29, 2013

Discussing custom forms and controls (again)

I recently updated the E911 example to 13.1 (it was very smooth, btw - only one change from IComplexPropertyEditor to IComplexViewItem) and refactored it a bit (improved some code, added more code comments and fully rewrote the description).

I think that you may be interested in checking this updated example (I reposted its description below), because it may help you better understand ideas behind XAF as well as how it works and is built internally.

In addition, I recommend you check out the following help articles in the XAF documentation:

eXpressApp Framework > Concepts > UI Construction
eXpressApp Framework > Concepts > UI Construction > UI Element Overview
because they should give you a better understanding of reusable XAF building blocks and see how to customize or replace them.

This example implements the following scenarios when an end-user clicks on a custom item in the navigation control:
- a custom non-XAF form is opened as a result;
- a standard XAF View containing a custom user control is opened as a result.
Both custom form and user controls display persistent data from the XAF application database:

To accomplish this, you can follow the instructions below:

1. Define a base structure of the navigation control in your XAF application, as shown in the E911.Module\Model.DesignedDiffs.xafml file.
You can simply copy and paste the contents of the NavigationItems element into the corresponding file (pre-opened via the text editor) of your platform-agnostic module.
The same customizations can be achieved via the Model Editor visually.

This navigation structure will be further customized in the WinForms and ASP.NET executable projects later.

2. Intercept events of the navigation control to display a custom form when a custom navigation item is clicked.
To do this, implement a WindowController into your platform-agnostic module and handle events of the ShowNavigationItemController class as per the E911.Module\Controllers\ShowCustomFormWindowController.xx file. This controller will be abstract and be overridden in WinForms and ASP.NET modules.

3. Declare a custom ViewItem class that is supposed to host a custom user control in the standard XAF View. To do this, implement a custom ViewItem descendant and related types in the platform-agnostic module as shown in the E911.Module\Editors\CustomUserControlViewItem.xx file.
This ViewItem will also be abstract and platform-agnostic as it will not create platform-dependent controls, and will just provide a common customization code for both platforms. For instance, the OnControlCreated method will be overridden to bind the created control to data. To access persistent data from the database used by an XAF application, the ViewItem will implement the IComplexViewItem interface that consists of a single Setup method, receiving the IObjectSpace and XafApplication objects as parameters.
To unify our data binding code for both platforms, the IXpoSessionAwareControl interface and an auxiliary XpoSessionAwareControlInitializer class are introduced.
The interface provides a single UpdateDataSource method that is implemented by custom forms and user controls to bind them to data received by means of XPO.
You can use a similar mechanism and modify these auxiliary types to pass other custom data into your custom forms and controls.

4. Define a base structure of the standard XAF View with a custom ViewItem as shown in the E911.Module\Model.DesignedDiffs.xafml file.
You can simply copy and paste the contents of the Views element into the corresponding file (pre-opened via the text editor) of your platform-agnostic module.

5. Create custom forms and user controls in WinForms and ASP.NET executable projects analogous with what is shown in the example. The easiest way to do this is to copy the contents of the E911.Win\Controls and E911.Web\Controls folders and then include the necessary files into your solution. Take special note that these custom forms and controls implement the IXpoSessionAwareControl interface to automatically receive persistent data and other parameters when they are created.

6. Implement platform-dependent behavior to open and customize custom forms and controls. To do this, copy the following files into your WinForms and ASP.NET module projects:
E911.Module.Win\Controllers\WinShowCustomFormWindowController.xx - contains an WinForms version of the WindowController, which is inherited from the platform-agnostic
E911.Module.Win\Editors\WinCustomUserControlViewItem.xx - contains an WinForms version of the ViewItem, which is inherited from the platform-agnostic one;
E911.Module.Win\WinModuleEx.xx - contains a registration code for WinForms version of the ViewItem;

E911.Module.Web\Editors\WebCustomUserControlViewItem.xx - contains an ASP.NET version of the ViewItem, which is inherited from the platform-agnostic one;
E911.Module.Web\WebModuleEx.xx - contains a registration code for ASP.NET version of the ViewItem;
E911.Module.Web\Controllers\WebShowCustomFormWindowController.xx - contains an ASP.NET version of the WindowController, which is inherited from the platform-agnostic one;

These platform-dependent versions of the WindowController and ViewItem are required to implement the creation and display of custom forms and controls using the means specific for each platform. They are also designed to provide the capability to be able to set custom forms and control settings via the Model Editor. For that purpose, custom Application Model extensions are implemented for the Navigation Item and View Item model elements.

7. Set the custom forms and controls settings for each platform.
To do this, copy the contents of the E911.Win\Model.xafml and E911.Web\Model.xafml files into the Model.xafml file in the executable WinForms and ASP.NET projects:


That is it.

1. It is also possible to mix the traditional and XAF development approaches (consult our Support Team if you are not sure how to integrate your standard non-XAF solution into XAF), because an XAF application is a regular .NET application built of reusable blocks like View, ViewItem, Property and List Editors, etc. that eventually create and customize platform-dependent controls exactly the same way you do this without XAF. So, using XAF does not mean something absolutely new and allows you to reuse your existing development skills and practices. Of course, it is possible to create your own reusable blocks if the standard ones do not meet your needs. For instance, the example of a custom View class designed to show a custom form can be found on CodeProject here.

2. This solution contains some generic code (e.g., base WindowController and ViewItem) that is mainly required because our XAF application is for both Windows and the Web. You may avoid this generic code and make a simpler implementation if you are developing for only one platform.

3. You can display custom forms not only when interacting with the navigation control, but from any other place. To do this, intercept the events of a required entity, e.g., an XAF Controller, Action or a View. Refer to the product documentation or consult with our Support Team in case of any difficulties.

4. By default controls layout and user customizations are preserved only for built-in XAF ListEditors, because they have special code for that. If you embed a custom user control into XAF, you need to preserve its settings yourself as well, exactly like you would do when implementing this task in the "old way" in a non-XAF application. Refer to the control's documentation to learn more on how to accomplish this task.
Feel free to contact the respective product team if you experience any difficulties customizing this control.