RadGridView:无法隐藏我的工具提示,无论是真还是假

时间:2014-12-15 12:46:11

标签: wpf telerik tooltip row radgridview

我有这个代码用于样式,他显示我的工具提示正确,但我想只在1个视图上启用showallcolumns(true / false):

<telerik:RadGridView.Resources>
     <Style TargetType="{x:Type telerik:GridViewRow}">
         <Setter Property="ToolTipService.IsEnabled" Value="{Binding ShowAllColumns}" />
         <Setter Property="ToolTip" Value="{Binding OrderStatus.Translation}" />
     </Style>
</telerik:RadGridView.Resources>

1 个答案:

答案 0 :(得分:1)

检查ToolTipService.IsEnabled属性的绑定源。 GridViewRow的DataContext是它的项目,在我看来,ShowAllColums属性在ViewModel中。尝试指定绑定源,如

<Setter Property="ToolTipService.IsEnabled" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=telerik:RadGridView} ,Path=DataContext.ShowAllColumns}" />

或任何其他方式。

相关问题