繁体   English   中英

如何在WPF C#中自定义这样的ListView?

[英]How to customize a ListView like this in wpf c#?

我是应用开发人员的新手。 我现在陷入了应用程序设计的困境。 此项目是一个类似于公告板的项目。 只是不知道以下哪种方式是设计我的数据的正确方法? 我不知道是否要使用DATAGRIDVIEWLISTVIEW / LISTBOX

在此处输入图片说明

希望从你们那里得到一些想法

正如Nex所说,最好将图片中显示的设计作为用户控件进行,然后再将ListView与数据模板一起使用,如下所示:

<ListView x:Name="mylistview">
    <ListView.ItemsPanel>
        <ItemsPanelTemplate>
            //a Panel container (i.e stackpanel, wrappanel)
        </ItemsPanelTemplate>
    </ListView.ItemsPanel>
    <ListView.ItemTemplate>
        <DataTemplate>
            //Your usercontrol
        </DataTemplate>
    </ListView.ItemTemplate>

当然,您将需要使用数据绑定来显示数据。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM