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.TaskContentTemplateSelector Property

Gets or sets an object that applies the task content template according to custom logic. This is a dependency property.

Namespace: DevExpress.Xpf.Gantt

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

NuGet Package: DevExpress.Wpf.Gantt

#Declaration

public DataTemplateSelector TaskContentTemplateSelector { get; set; }

#Property Value

Type Description
DataTemplateSelector

A DataTemplateSelector descendant that applies the task content template according to custom logic.

#Remarks

The TaskContentTemplate property specifies a template that defines the appearance of task content.

If you use more than one task content template, you can implement a selector to apply the template according to custom logic. Follow the steps below:

  1. Derive your template selector class from DataTemplateSelector.
  2. Implement the SelectTemplate method that returns the template based on your condition.
  3. Assign your template selector to the TaskContentTemplateSelector property.

If View contains both TaskContentTemplate and TaskContentTemplateSelector, the GanttControl renders the template assigned to the TaskContentTemplate property.

See Also