LayoutViewInfoCustomizingEventArgs.ShouldRecalculateLayout Property

Forces layout recalculation after applying changes specified in the event handler.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v20.1.dll


public bool ShouldRecalculateLayout { get; set; }
Public Property ShouldRecalculateLayout As Boolean

Property Value

Type Description

True, to recalculate the layout to properly display modified visual elements; otherwise, false.


Set the ShouldRecalculateLayout option to true to force layout recalculation, so that changes applied to the header in the SchedulerControl.LayoutViewInfoCustomizing event handler display correctly.

This setting is useful when certain changes, such as larger font or longer text, results in a header content that does not fit its previously calculated bounds.


This setting affects only date and resource headers. Other visual elements layouts are not recalculated.


This example handles the SchedulerControl.LayoutViewInfoCustomizing event to change resource header captions.

Longer text or a new line in the caption require that the header increases its height to fit the content. The ShouldRecalculateLayout option set to true forces layout recalculation so that changes applied to the header display correctly.

    scheduler.GroupType = SchedulerGroupType.Resource;
    scheduler.ActiveViewType = SchedulerViewType.Timeline;
    scheduler.LayoutViewInfoCustomizing += scheduler_LayoutViewInfoCustomizingResourceHeaders; ;

public static void scheduler_LayoutViewInfoCustomizingResourceHeaders(object sender, LayoutViewInfoCustomizingEventArgs e) {
    if (e.Kind == LayoutElementKind.ResourceHeader) {
        ResourceHeader header = e.ViewInfo as ResourceHeader;
        header.Caption = header.Resource.Caption + "\r\nNew long text line";
        e.ShouldRecalculateLayout = true;
See Also