Skip to main content
A newer version of this page is available. .

GanttView.Zoom Property

Gets or sets the current zoom. This is a dependency property.

Namespace: DevExpress.Xpf.Gantt

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

Declaration

public TimeSpan Zoom { get; set; }

Property Value

Type Description
TimeSpan

A time span that occupies 1 pixel in the timescale.

Remarks

The Zoom property returns a System.TimeSpan value that occupies a single pixel rendered on screen.

The image below illustrates the GanttControl with the Zoom property set to 1 minute. This means that each hour in the time scale occupies 60 pixels (1 px for each minute) and each 30 minute span occupies 30 pixels.

The code sample below demonstrates how to set the Zoom property to 1 minute.

<dxgn:GanttControl ItemsSource="{Binding Tasks}">
    <dxgn:GanttControl.View>
        <dxgn:GanttView ... Zoom="00:01:00">
        </dxgn:GanttView>
    </dxgn:GanttControl.View>
</dxgn:GanttControl>
See Also