如何向 DataGridTextColumn 添加工具提示 [英] How do I Add a Tooltip To a DataGridTextColumn

查看:27
本文介绍了如何向 DataGridTextColumn 添加工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 WPFtoolkit DataGrid ,我必须将文本包装在 DataGridTextColumn 或我必须将 ToolTip 添加到文本列.我已经在网上搜索过,但找不到合适的解决方案.期待您的宝贵建议...

I'm using WPFtoolkit DataGrid ,I have to wrap text in a DataGridTextColumn or I have to add a ToolTip to the text column. I have searched the net but i couldn't get a proper solution. Expecting your valuable suggestions...

推荐答案

是的,您可以将工具提示文本添加到 DataGridTextColumn - 只需对其进行样式化

Yes, you can add tooltip text to DataGridTextColumn - just stylize it

<DataGridTextColumn Header="ScreenName" Binding="{Binding ScreenName}" >
    <DataGridTextColumn.CellStyle>
        <Style TargetType="DataGridCell">
            <Setter Property="ToolTip" Value="{Binding Name}" />
        </Style>
    </DataGridTextColumn.CellStyle>
</DataGridTextColumn>

这篇关于如何向 DataGridTextColumn 添加工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆