【问题标题】:Binding Tooltip to each item of WPFToolkit DropDownColumn将 Tooltip 绑定到 WPFToolkit DropDownColumn 的每一项
【发布时间】:2012-05-15 16:58:42
【问题描述】:

如何将工具提示文本绑定到 WPFToolkit 的 DataGrid 中的 A 下拉列表的每个项目。

我使用以下代码

<WPFtoolkit:DataGridComboBoxColumn x:Name="dgCboTransformation" MinWidth="100" MaxWidth="125" 
                                             Header="Transformation" DisplayMemberPath="Name" SelectedValuePath="Signature"
                                             SelectedValueBinding="{Binding Path=Transformation}" Visibility="Collapsed"
                                             ToolTipService.IsEnabled="true">
                    <ToolTipService.ToolTip>
                        <TextBlock Foreground="Green" Text="{Binding Path=Signature}"/>
                    </ToolTipService.ToolTip>
                </WPFtoolkit:DataGridComboBoxColumn>

【问题讨论】:

    标签: c# wpf xaml grid wpftoolkit


    【解决方案1】:

    您应该可以使用 ItemContainerStyle。

    这是我过去如何单独启用 CheckListBox 中的项目

    <wpf:CheckListBox>
      <wpf:CheckListBox.ItemContainerStyle>
        <Style TargetType="{x:Type wpf:CheckListBoxItem}">
            <Setter Property="IsEnabled"
                    Value="{Binding Path=LogisticareIDIsValid}" />
            <EventSetter Event="MouseDoubleClick"
                    Handler="listResultsDoubleClick" />
        </Style>
      </wpf:CheckListBox.ItemContainerStyle>
    </wpf:CheckListBox>
    

    【讨论】:

      猜你喜欢
      • 2010-12-21
      • 2012-04-07
      • 2019-07-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多