All docs
V20.2
20.2 (EAP/Beta)
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
You are viewing help content for pre-release software. This document and the features it describes are subject to change.

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

Declaration

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

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.

See Also