【问题标题】:RadGridView: can't hide my tooltip for row on true or falseRadGridView:无法在真或假时隐藏我的行工具提示
【发布时间】:2014-12-15 12:46:10
【问题描述】:

我有这个样式代码,他显示我的工具提示正确,但我只想在 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>

【问题讨论】:

    标签: wpf telerik tooltip row radgridview


    【解决方案1】:

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

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

    或任何其他方式。

    【讨论】:

    • 谢谢,帮了我很多忙
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-02
    • 2021-02-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多