All docs
V21.2
21.2
21.1
20.2
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.

GanttView.PrintTaskContentTemplate Property

Gets or sets a template that defines the task content appearance in the printed GanttControl. This is a dependency property.

Namespace: DevExpress.Xpf.Gantt

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

Declaration

public DataTemplate PrintTaskContentTemplate { get; set; }

Property Value

Type Description
DataTemplate

A template that defines the task content appearance.

Remarks

Each task in the Gantt area displays a label with its name. If you want to display custom content, create a template and assign it to the PrintTaskContentTemplate property:

<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> 

You can implement a selector to apply the template according to custom logic. Refer to the following topic for more information: PrintTaskContentTemplateSelector.

If View contains both PrintTaskContentTemplate and PrintTaskContentTemplateSelector, the GanttControl renders the template assigned to the PrintTaskContentTemplate property.

Refer to the following topic for more information on how to customize the printed document: Print and Export.

See Also