问题描述
我使用VS2010建立在C#WPF应用程序
I am building a WPF application in C# using VS2010
我有一个包含从数据库项目列表视图,以及每个项目包含一个名为(名称)域和所谓的(时间)。另一场
I have a listview that contains items from a database , and each item contains a field called (Name) and another field called (Time) .
早在数据库中,每一个项目都有一个称为第三个字段(描述)太...
Back in the database , each item has a third field called (Description) too ...
现在我想要的是:
当我选择从列表视图项,工具提示显示,它包含从第三字段中的数据。
Now what I want is :When I choose an item from the listview , a tooltip is shown and it contains the data from the third field ..
我怎么能在一个列表视图的各种提示 - 为每件商品的提示 - ??
我该如何处理我的数据库?
How can I have various tooltips on one listview - one tooltip for each item - ??How can I deal with my database ??
感谢您
推荐答案
设置tooltip的ListViewItem的可以这样做。
Setting the Tooltip for a ListViewItem can be done like this
<ListView ...>
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListViewItem}">
<Setter Property="ToolTip" Value="{Binding Path=Name}"/>
</Style>
</ListView.ItemContainerStyle>
<!-- ... -->
</ListView>
这篇关于列表视图麻烦 - 所需的工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!