Back to Devexpress

GanttControl.View Property

wpf-devexpress-dot-xpf-dot-gantt-dot-ganttcontrol-30a44dd3.md

latest3.0 KB
Original Source

GanttControl.View Property

Gets or sets the GanttControl‘s view. This is a dependency property.

Namespace : DevExpress.Xpf.Gantt

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

NuGet Package : DevExpress.Wpf.Gantt

Declaration

csharp
public GanttView View { get; set; }
vb
Public Property View As GanttView

Property Value

TypeDescription
GanttView

A GanttView object that is a view that displays Gantt chart.

|

Remarks

As a TreeListControl descendant, the GanttControl does not display data itself. It uses a View to display data from the bound data source. A View specifies how gantt chart items are displayed.

The GanttControl initializes the View property with a GanttView object when created.

The code sample below demonstrates how to set the View property.

xaml
<dxgn:GanttControl ItemsSource="{Binding Tasks}">
    ...
    <dxgn:GanttControl.View>
        <dxgn:GanttView ... />
    </dxgn:GanttControl.View>
</dxgn:GanttControl>

The following code snippets (auto-collected from DevExpress Examples) contain references to the View property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-ganttcontrol-getting-started/CS/GanttControlDemoApp/MainWindow.xaml#L17

xml
</dxgn:GanttControl.Columns>
<dxgn:GanttControl.View>
    <dxgn:GanttView

wpf-dashboard-how-to-embed-devexpress-control/CS/GanttSample/Window.xaml#L20

xml
<dxgn:GanttControl ItemsSource="{Binding GanttTasks}" DataContext="{Binding DataContext, RelativeSource={RelativeSource AncestorType=Window}}" >
    <dxgn:GanttControl.View>
        <dxgn:GanttView

See Also

GanttControl Class

GanttControl Members

DevExpress.Xpf.Gantt Namespace