Question

I already know how to set the tooltip for a XamDataGrid using a style, e.g.:

<Style TargetType={x:Type ig:DataRecordCellArea>...

However, for a specific reason (don't have time to explain it all), I really need to invoke the tooltip programmatically, preferably hooked to a MouseOver event.

I would really appreciate it if someone could illustrate the way. What have I done so far? Not much, because the Infragistics site is full of XAML examples and doesn't offer any guidance on doing this programmatically (except for one trivial cell-level tooltip example).

Was it helpful?

Solution

<XamlDataGrid MouseEnter="XamlDataGridMouseEnter"/>

private void XamlDataGridMouseEnter(object Sender, MouseEventArgs e)
{
    ToolTipService.SetIsEnabled((XamlDataGrid)Sender, true);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top