expressappframework-113680-ui-construction-views-layout-view-items-layout-generation.md
The XAF automatically generates all Dashboard Views and Detail Views according to the Application Model information. There are certain rules used to generate a default layout that minimize required customizations. These rules are described in this topic.
To generate Dashboard Views and Detail Views, XAF uses the information stored in the Application Model‘s Views | DashboardView and DetailView nodes. These nodes have two child nodes:
The following image demonstrates both the Items and Layout nodes.
false.Index property in code with the IndexAttribute.In the following picture, the image on the left illustrates an auto-generated layout for a sample Contact business class’ Detail View. The image on the right illustrates the auto-generated layout’s structure.
Contact class inherits from the Person class that has some public properties. XAF creates two nested Layout Groups in the “Simple Editors” Layout Group: “Contact” and “Person”.Contact class has only four public properties. XAF places the corresponding property editors directly in the “Contact” Layout Group.Person business class exposes more than four public properties, XAF creates two nested Layout Groups are created: the “Person_col1” and “Person_col2”. The Property Editors that display the public properties of the Person class are divided between these Layout Groups.Notes public property belongs to the Contact class. However, it has the Size(-1) attribute, therefore its Property Editor has a variable height. This condition places the Notes Property Editor in the “Sizeable Editors” Layout Group.Task, Change History and Phone Numbers are collection properties. XAF creates the “Tabs” Tabbed Group and places each Property Editor in an individual Layout Group.XAF can generate layout groups automatically when you customize the layout at runtime or design time in the Model Editor. This happens when you add a layout element next to another layout element in a way that breaks the containing layout group’s flow direction, for example, when you place layout item “A” to the left or right of layout item “B” in a layout group where items are arranged vertically. Since all layout elements within the same group must have the same flow direction, XAF has to create a wrapping layout group with the horizontal flow direction containing the items “A” and “B”. This behavior is called wrapping. Auto-generated wrapping groups usually have a random ID with the “Auto” prefix. These groups may not immediately appear in the “Layout Tree View” tab of the layout customization window.
Before rearrangement After rearrangement (with an auto-generated wrapping group) See Also