Roberto Salemi

Roberto Salemi

  • NA
  • 146
  • 141.1k

[WPF] DataGrid: the tooltips on Path are not alwat visibile

Jul 3 2015 9:45 AM
Hi,
I have this two columns, the first is created for test, the second is the definitive column.
The first:
<DataGridTextColumn Binding="{Binding Note, Mode=OneWay}" Header="Note" CanUserSort="True">
<DataGridTextColumn.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="ToolTip" Value="{Binding Note}" />
</Style>
</DataGridTextColumn.CellStyle>
</DataGridTextColumn>
The second:
<DataGridTemplateColumn SortMemberPath="Note">
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<Path
Data="{StaticResource IconNote}"
Style="{StaticResource smplMngmntIconHeader}"
>
<Path.ToolTip>
<TextBlock>
<Run Text="{StaticResource tooltTipHeaderNote}"/>
</TextBlock>
</Path.ToolTip>
</Path>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Path
Data="{StaticResource IconNote}"
Visibility="{Binding Note, Converter={StaticResource smplMngmntIconDataGridVisibility}}"
Style="{StaticResource smplMngmntIconDataGrid}"
>
<Path.ToolTip>
<TextBlock Text="{Binding Note, Converter={StaticResource SampleBlendingFormatString}}"/>
</Path.ToolTip>
</Path>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
The tooltip on first column is shown always, without problem.
In the second column i created a convert for show or hide the icon, but the tooltip for some icon is shown for others no.
Why?
Thanks.

Answers (2)