GanttControl.HtmlTemplates Property
A collection of HTML-CSS templates that can be applied to Gantt UI elements.
Namespace: DevExpress.XtraGantt
Assembly: DevExpress.XtraGantt.v21.2.dll
NuGet Packages: DevExpress.Win.Design, DevExpress.Win.Gantt
Declaration
[XtraSerializableProperty(XtraSerializationVisibility.Collection)]
public HtmlTemplateCollection HtmlTemplates { get; }
Property Value
Type | Description |
---|---|
DevExpress.Utils.Html.HtmlTemplateCollection | Stores HTML-CSS templates. |
Remarks
Gantt Control supports HTML/CSS templates for the following UI elements:
- Tasks, Summaries, and Milestones
- Regular and Summary Task Progress
- Regular, Summary, and Milestone Task Baselines
- Text Labels
- Interaction tooltips
- Split Tasks
Handle the GanttControl.QueryItemTemplate event to apply a template.
void GanttControl1_QueryItemTemplate(object sender, QueryItemTemplateEventArgs e) {
switch(e.ItemType) {
case GanttChartItemType.Task:
case GanttChartItemType.SummaryTask:
e.Template.Assign(TaskTemplate);
break;
case GanttChartItemType.Progress:
case GanttChartItemType.SummaryTaskProgress:
e.Template.Assign(TaskProgressTemplate);
break;
case GanttChartItemType.TextLabel:
e.Template.Assign(TaskTextLabelTemplate);
break;
}
}
See this documentation article for more information: HTML Templates in Gantt Control.
See Also