0
我创建了一个WPF应用程序,其中包括一个DataGrid。我可以轻松设置单元格的工具提示。我想要做的是能够手动设置此工具提示的宽度和高度。我有以下XAML:如何datagrid单元格工具提示大小(高度/宽度)?
<DataGridTextColumn x:Name="MessageColumnTooltip"
Binding="{Binding Message}" Header="Message" Width="*" >
<DataGridTextColumn.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="ToolTip" Value="{Binding Message}" />
<Setter Property="ToolTip.Width" Value="10" />
<Setter Property="ToolTip.Height" Value="10" />
<Setter Property="Width" Value="auto"/>
<Setter Property="Height" Value="auto"/>
</Style>
</DataGridTextColumn.CellStyle>
</DataGridTextColumn>
但设置为Tooltip.Width和Tooltip.Height值应用于细胞大小,而不是即使我将单元的高度和宽度,以及。我试图只有设置Tooltip.Width和Tooltip.Height以及,但没有工作。任何人都可以帮忙吗?
它的工作!非常感谢! – arvind