We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
Scott Guthrie 有一些很棒的教程,涵盖了列表视图控件
http://weblogs.asp.net/scottgu/archive/2007/08/10/the-asp-listview- control-part-1-building-a-product-listing-page-with-clean-css-ui.aspx
Scott Guthrie has some great tutorials covering the listview control
http://weblogs.asp.net/scottgu/archive/2007/08/10/the-asp-listview-control-part-1-building-a-product-listing-page-with-clean-css-ui.aspx
基于普通Listviewitem创建自己的listviewitem并进行自己的绘图
Create your own listviewitem based on the normal Listviewitem and and do your own drawing
在 WPF 中,您可以使用 ListViewItem 来描述 ListViewItem 的外观,甚至可以使用 DataTemplate。 这是解决上述问题的一个非常简单的开始,然后看看您是否可以根据您的需要使用它。
阅读评论:可以有两种方法,而不是将这个特定部分视为您的 ListBoxItem。
您处于当前 ListViewItem 绑定的上下文中,因此您可以描述下一个块以满足您的需求。
您处于当前
您可以使用“中间人”ViewModel,其中包含对另一个 ViewModel 的引用,该 ViewModel 描述了“多行子项 3”中的内容。 这将允许您在两种类型上使用 DataTemplate 并单独显示每种类型。 这个解决方案一开始很复杂,但看起来更符合您的问题。
In WPF you can use the ListViewItem to describe how a ListViewItem should look, or even use a DataTemplate. Here is a really simple start to your above problem, then see if you can play with it to your needs.
Read Comment: Instead of thinking of this specific part as your ListBoxItem, there can be two approaches.
You are in the context of your current ListViewItem's binding, so you can describe that next block to suit your needs.
You can use an "middle-man" ViewModel that contains a reference to another ViewModel that describes your content in "Multiline subitem 3". This would allow you to use a DataTemplate on both types and separate the display of each. This solution is complex, at first, but looks to be more in line with your question.