Skip to main content

SpreadsheetControl.CellToolTip Property

Gets or sets the cell tooltip. This is a dependency property.

Namespace: DevExpress.Xpf.Spreadsheet

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

NuGet Package: DevExpress.Wpf.Spreadsheet

Declaration

public object CellToolTip { get; set; }

Property Value

Type Description
Object

An object that is used as the cell tooltip.

Remarks

The SpreadsheetControl.ShowCellToolTipMode property determines when a cell tooltip is displayed. By default, a tooltip contains the cell text and is displayed when the cell content does not fit the cell.

Use the CellToolTip to specify a custom tooltip container object or a custom text to display.

You can also change the default tooltip binding to show a cell property other than the Cell.DisplayText. To accomplish this, change the binding in the data template in XAML. The following markup snippet illustrates how to display a cell formula in a tooltip.

xmlns:dxspsi="http://schemas.devexpress.com/winfx/2008/xaml/spreadsheet/internal"
    xmlns:dxspst="http://schemas.devexpress.com/winfx/2008/xaml/spreadsheet/themekeys"
<!-- ... -->
    <Window.Resources>
        <DataTemplate x:Key="{dxspst:SpreadsheetThemeKey ResourceKey=CellControlContentTemplate, IsThemeIndependent=True}" 
                      DataType="{x:Type dxsps:CellData}">
            <dxspsi:CellControl TextSettings="{Binding TextSettings}" ToolTip="{Binding Cell.Formula}" />
        </DataTemplate>    <Window.Resources>
See Also