Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GanttView.FitDataToWidth(Double) Method

Zooms Gantt tasks to fit them into the Gantt area with a specified margin.

Namespace: DevExpress.Xpf.Gantt

Assembly: DevExpress.Xpf.Gantt.v24.2.dll

NuGet Package: DevExpress.Wpf.Gantt

#Declaration

public void FitDataToWidth(
    double margin = 0
)

#Optional Parameters

Name Type Default Description
margin Double 0

A distance (in pixels) between a left-most task and the left border of Gantt area (or a right-most task and the right border). The left and right margin are equal.

#Remarks

The method call has no result until the GanttControl is loaded and has a non-zero width, or not bound to data.

See Also