Breaking Change T995722
Visible to All Users

Form Layout - Changed the default approach used to calculate caption paddings

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.

blazor-formlayout-c...n-alignment-all.png

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.

blazor-formlayout-c...gnment-ingroups.png

You can now also disable automatic padding calculation and use different caption widths for all captions in the component (ItemCaptionAlignment.None).

blazor-formlayout-c...-alignment-none.png

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>

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.