Spread for silverlight 单元格设置悬浮显示信息
鼠标移过单元格,如何设置悬浮提示信息? 回复 1楼yaoxiaoqiang00的帖子可以通过 floating object 进行添加:
public class MyFloatingObject : GrapeCity.Windows.SpreadSheet.UI.CustomFloatingObject
{
public MyFloatingObject(string name, double x, double y, double width, double height)
: base(name, x, y, width, height)
{
}
public override FrameworkElement Content
{
get
{
Border border = new Border();
StackPanel sp = new StackPanel();
sp.Children.Add(new Label() { Content = "Label" });
sp.Children.Add(new Button() { Content = "Button" });
border.BorderThickness = new Thickness(1);
border.BorderBrush = new SolidColorBrush(Colors.Black);
border.Child = sp;
return border;
}
}
}
//add instance of this floating object into worksheet
MyFloatingObject mf = new MyFloatingObject("mf1", 10, 10, 200, 100);
gcSpreadSheet1.ActiveSheet.FloatingObjects.Add(mf);
页:
[1]