GanttView.PrintTaskContentTemplate Property
Gets or sets the template that defines the task content appearance in the printed GanttControl. This is a dependency property.
Namespace: DevExpress.Xpf.Gantt
Assembly: DevExpress.Xpf.Gantt.v20.2.dll
NuGet Packages: DevExpress.WindowsDesktop.Wpf.Gantt, DevExpress.Wpf.Gantt
Declaration
Property Value
Type | Description |
---|---|
DataTemplate | The template used to print task content. |
Remarks
You can display custom task content in the Gantt area next to tasks. The PrintTaskContentTemplate property allows you to specify the template that defines the task content appearance.
If you have more than one print task template, use the PrintTaskContentTemplateSelector to implement custom logic to choose the required template.
If you specify both the PrintTaskContentTemplate and PrintTaskContentTemplateSelector, the GanttControl uses the template returned by the template selector to print task contents.
If the template selector returns null, the GanttControl uses the template specified by the PrintTaskContentTemplate property.
Example
<dxgn:GanttControl ItemsSource="{Binding Items}">
<dxgn:GanttControl.View>
<dxgn:GanttView ...>
<dxgn:GanttView.PrintTaskContentTemplate>
<DataTemplate>
<TextBlock Text="{DXBinding 'Row.Name'}"
Foreground="White"
Background="PaleVioletRed"
FontStyle="Italic"/>
</DataTemplate>
</dxgn:GanttView.PrintTaskContentTemplate>
</dxgn:GanttView>
</dxgn:GanttControl.View>
</dxgn:GanttControl>
Refer to the Print and Export topic for more information on how to customize the printed document.