GanttView.TaskContentTemplate Property

Gets or sets a template that defines the task content presentation. This is a dependency property.

Namespace: DevExpress.Xpf.Gantt

Assembly: DevExpress.Xpf.Gantt.v20.1.dll


public DataTemplate TaskContentTemplate { get; set; }
Public Property TaskContentTemplate As DataTemplate

Property Value

Type Description

A template used to render task content.


You can display custom task content in the Gantt area next to tasks. Use the TaskContentPosition property to specify the task content position. The TaskContentTemplate property allows you to specify the template that defines the task content presentation.

If you have more than one template that can be used to render task contents, you can implement custom logic to choose the required template. To do this, derive from the DataTemplateSelector class, implement the SelectTemplate method that returns a template which meets the required condition, and assign it to the TaskContentTemplateSelector property.

If both the TaskContentTemplate and TaskContentTemplateSelector are specified, task contents are rendered using the template returned by the template selector. If the template selector returns null, the template specified by the TaskContentTemplate property is used.


<dxgn:GanttControl ItemsSource="{Binding Items}">
        <dxgn:GanttColumn BindTo="Name"/>
        <dxgn:GanttColumn BindTo="StartDate"/>
        <dxgn:GanttColumn BindTo="FinishDate"/>
        <dxgn:GanttView ...>
                    <TextBlock Text="{DXBinding 'Row.ResourceName'}" />
See Also