Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

HeatmapToolTipOptions.Pattern Property

Gets or sets a format string that is applied to tooltip text.

Namespace: DevExpress.Xpf.Charts.Heatmap

Assembly: DevExpress.Xpf.Charts.v24.2.dll

NuGet Package: DevExpress.Wpf.Charts

#Declaration

public string Pattern { get; set; }

#Property Value

Type Description
String

A string that formats tooltip text. Default value: “X-Argument: {X}\nY-Argument: {Y}\nValue: {V}”

#Property Paths

You can access this nested property as listed below:

Object Type Path to Pattern
HeatmapControl
.ToolTipOptions .Pattern

#Remarks

Set the HeatmapControl.ToolTipEnabled property to true to enable tooltips.

Tooltip text patterns can comprise plain text and placeholders with format specifiers. The following table lists available placeholders:

Placeholder Description
{X} Displays a heatmap cell x-argument.
{Y} Displays a heatmap cell y-argument.
{V} Displays a heatmap cell value.

#Example

The following example shows how to enable tooltips for heatmap cells and configure tooltip options:

Customized tooltip

<Window.Resources>
    <DataTemplate x:Key="tooltipTemplate">
        <StackPanel Orientation="Vertical" Margin="8">
            <Label Foreground="Black" 
                   FontStyle="Italic" 
                   FontSize="14" 
                   Content="{Binding Path=ToolTipText}" />
        </StackPanel>
    </DataTemplate>
</Window.Resources>
<Grid>
    <dxh:HeatmapControl ToolTipEnabled="True" 
                        ToolTipTemplate="{StaticResource ResourceKey=tooltipTemplate}">
        <dxh:HeatmapControl.ToolTipOptions>
            <dxh:HeatmapToolTipOptions ContentMargin="0" 
                                       Pattern="X: {X}&#x0a;Y: {Y}&#x0a;Value: {V}" 
                                       OpenMode="OnHover" 
                                       AutoPopDelay="00:00:03" 
                                       InitialDelay="00:00:00.1" 
                                       CloseOnClick="False"/>
        </dxh:HeatmapControl.ToolTipOptions>
        <!--...-->
    </dxh:HeatmapControl>
</Grid>
See Also