0
我正在wpf中填充数据网格中的某些东西。 我需要为数据网格中的每一行,当我指向我的鼠标,工具提示应该是可见的包含图像。这个图像对于数据网格的每一行都是不同的。我如何去做。我已经能够做到这一点:不同的图像作为提示wpf中的数据网格中不同行的工具提示
Image img = new Image();
BitmapImage bmp = new BitmapImage();
bmp.BeginInit();
bmp.UriSource = new Uri(Directory.GetCurrentDirectory()+ "\\Kartik.JPG");
bmp.DecodePixelHeight=200;
bmp.DecodePixelWidth=200;
bmp.EndInit();
img.Source=bmp;
ToolTipService.SetPlacement(dgAssortment, System.Windows.Controls.Primitives.PlacementMode.Center);
ToolTipService.SetToolTip(dgAssortment, img);
ToolTipService.SetShowDuration(dgAssortment, 99999999);
但是这显示了相同的形象,为整个数据网格,无论什么排的我把我的鼠标指针上。我怎样才能使这个图像不同填充在数据网格中的每一行。请帮忙。提前致谢。