I am doing something in wpf where in a datagrid is populated. I need that for each row in the datagrid, when i point my mouse, a tooltip should be visible containing an image. And this image will be different for each row of the datagrid. How do i go about it. I have been able to do this:
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);
But this shows the same image for the entire datagrid, irrespective of what row i keep my mouse pointer on. How can I make this image different for each row populated in the datagrid. Please help. Thanks in advance.