请问除了使用单元格的tag属性实现tooltip外,是否有其他方式可以实现tooltip,因为Tag属性已被其他业务占用
protected ToolTip toolTip = null;
protected virtual void _gcSpread_MouseMove(object sender, System.Windows.Input.MouseEventArgs e)
{
var point = e.GetPosition(_gcSpread);
var info = _gcSpread.HitTest(point.X, point.Y);
toolTip.IsOpen = false;
if (info.HitTestType == HitTestType.Viewport && info.ViewportInfo != null)
{
var cell = _gcSpread.ActiveSheet.Cells[info.ViewportInfo.Row, info.ViewportInfo.Column];
if (cell.Tag != null)
{
toolTip.Content = cell.Tag.ToString();
toolTip.IsOpen = true;
}
}
}
|
|