Back to Devexpress

SpreadsheetControl.CellToolTip Property

wpf-devexpress-dot-xpf-dot-spreadsheet-dot-spreadsheetcontrol-5ec2fbe4.md

latest2.3 KB
Original Source

SpreadsheetControl.CellToolTip Property

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

Namespace : DevExpress.Xpf.Spreadsheet

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

NuGet Package : DevExpress.Wpf.Spreadsheet

Declaration

csharp
public object CellToolTip { get; set; }
vb
Public Property CellToolTip As Object

Property Value

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

xaml
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

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.Xpf.Spreadsheet Namespace