我有以下 DataGrid,由于某种原因,当我悬停在行上时,我为一行创建的工具提示没有显示:
<DataGrid
Name="dataGrid"
CanUserAddRows="False"
CanUserDeleteRows="False"
CanUserReorderColumns="False"
GridLinesVisibility="None"
ItemsSource="{Binding PermissionsCollection,UpdateSourceTrigger=PropertyChanged}"
AlternatingRowBackground="{StaticResource VigilantDataGridAlternatingRowColor}"
ColumnHeaderStyle="{StaticResource VigilantDataGridColumnHeader}"
RowHeaderWidth="0"
RowHeight="30"
AutoGenerateColumns="False"
SelectionMode="Single"
Height="536"
Width="700"
IsTextSearchEnabled="True"
ToolTipService.ShowOnDisabled="True">
<DataGrid.Resources>
<Style TargetType="DataGridCell">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<EventSetter Event="MouseDown" Handler="MouseDownHandler"/>
</Style>
<Style TargetType="{x:Type DataGridRow}">
<Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
<Setter Property="ToolTip">
<Setter.Value>
<TextBlock Text="1234"/>
</Setter.Value>
</Setter>
<Setter Property="IsHitTestVisible" Value="False" />
</Style>
</DataGrid.Resources>
有任何想法吗?