What Changed
We changed the default approach used to calculate the caption paddings in the Form Layout component.
Reasons for Change
In previous versions, the Form Layout component used the same width for all of the item captions. This width was set to the width of the longest caption in the component.
In v21.1, the new ItemCaptionAlignment property was introduced. The default value of this property is ItemCaptionAlignment.InGroups
. In this mode, all the captions in the group have the same width. However, the caption widths in different groups may vary.
This change allows you to create more flexible form designs.
You can now also disable automatic padding calculation and use different caption widths for all captions in the component (ItemCaptionAlignment.None
).
Impact on Existing Apps
This change impacts your application if you used several groups in the Form Layout component. Now, the paddings are calculated for each group individually.
How to Revert to Previous Behavior
Set the Form Layout’s ItemCaptionAlignment property to ItemCaptionAlignment.All
.
Razor<DxFormLayout ItemCaptionAlignment="ItemCaptionAlignment.All">
<!-- -->
</DxFormLayout>