2
votes

I have my datagrid configured to show a custom tooltip for each row.

My problem is that this tooltip is slightly aggressive for the user, and takes a good part of the screen (I do not have the choice to reduce it). So in order to try to be less aggressive, I put a property to set the InitialShowDelay to 2000 ms, so that the tooltip appears 2 seconds after the user puts the mouse over a row.

It works fine when the mouse is somewhere else, then enters to the datagrid and it's over a row (2 seconds later the tooltip appears). But now, when moving to another row (datagrid did not lose the focus), the tooltip for the other row immediately appears. So it does not look to take into account the InitialShowDelay property...

My code is like this:

<DataGrid ...>
   <DataGrid.RowStyle>
      <Style TargetType="DataGridRow">
             <Setter Property="ToolTip" Value="{StaticResource TooltipTemplateStyle}"></Setter>
             <Setter Property="ToolTipService.ShowDuration" Value="48000"></Setter>
             <Setter Property="ToolTipService.InitialShowDelay" Value="2000"></Setter>
      </Style>
    </DataGrid.RowStyle>
</DataGrid>

Do you know any way to set a tooltip delay when moving from one row to another within the same datagrid?

Thanks in advance!

1

1 Answers

1
votes

I think what you're looking for is BetweenShowDelay. read more here MSDN.

Usage (from that page):

  <Ellipse Height="25" Width="50" 
           Fill="Gray" 
           HorizontalAlignment="Left"
           ToolTipService.InitialShowDelay="1000"
           ToolTipService.ShowDuration="7000"
           ToolTipService.BetweenShowDelay="2000">