The requested page is not available for the requested platform. You are viewing the content for Default platform.
A newer version of this page is available. Switch to the current version.

How to: Customize Tabs Generation in a Mobile Detail View

  • 2 min to read

Mobile applications with the extended Detail View layout display a layout group as a tab depending on certain conditions. Refer to the Mobile Detail View Layout topic's Tabbed Groups section for more information. If the group does not fulfill these conditions, XAF shows it as a simple group or does not generate it. This topic describes how to change these default conditions, for example, how to generate tabs for tabbed groups, which contain one layout item displaying a collection property. Follow the steps below to implement this behavior in your Mobile application:

  • In the Mobile application's project, create a new MobileLayoutManager descendant named "CustomMobileLayoutManager". Override its protected CanCreateTab method as follows to allow tab generation for all tabbed groups:

    using DevExpress.ExpressApp.Mobile.Layout;
    using DevExpress.ExpressApp.Model;
    // ...
    public class CustomMobileLayoutManager : MobileLayoutManager {
      // ...  
      protected override bool CanCreateTab(IModelViewLayoutElement layoutItem) {
          return true;
  • Open the MobileApplication.cs (MobileApplication.vb) file and override the MobileApplication's CreateLayoutManagerCore method as shown below.

    using DevExpress.ExpressApp.Layout;
    using DevExpress.ExpressApp.Mobile;
    // ...
    public partial class Solution2MobileApplication : MobileApplication {
      // ...  
      protected override LayoutManager CreateLayoutManagerCore(bool simple) {
          return new CustomMobileLayoutManager();

As a result, XAF displays groups that contain a single layout item for a collection property as tabs: