Skip to main content

ColumnBase.HeaderToolTipTemplate Property

Gets or sets a template that defines the appearance of the column header’s tooltip. This is a dependency property.

Namespace: DevExpress.WinUI.Grid

Assembly: DevExpress.WinUI.Grid.v23.2.dll

NuGet Package: DevExpress.WinUI

Declaration

[DP(null)]
public DataTemplate HeaderToolTipTemplate { get; set; }

Property Value

Type Description
DataTemplate

A template that defines the tooltip’s appearance. The template’s data context is a HeaderData object.

Remarks

Use the ColumnBase.HeaderToolTip property to set the tooltip’s text. To define a custom column header tooltip, use the HeaderToolTipTemplate property.

The following code sample adds an image to a tooltip:

WinUI Grid - Custom Header Tooltip

<dxg:GridControl ...>
    <dxg:GridControl.Columns>
        <dxg:GridTextColumn FieldName="ProductName">
            <dxg:GridTextColumn.HeaderToolTipTemplate>
                <DataTemplate x:DataType="dxg:HeaderData">
                    <StackPanel Orientation="Horizontal">
                        <Image Source="ProductName.svg" Stretch="UniformToFill" Height="16" Width="16"/>
                        <TextBlock Text="{x:Bind ToolTip}" Margin="3,0,0,0"/>
                    </StackPanel>
                </DataTemplate>
            </dxg:GridTextColumn.HeaderToolTipTemplate>
        </dxg:GridTextColumn>
        <!-- ... -->
    </dxg:GridControl.Columns>
</dxg:GridControl>
See Also