WPF ListView多行显示
//前台
<ListView Margin="14,152,12,74" Name="lvList" SelectionMode="Multiple"> <ListView.View> <GridView x:Name="gvShow"> <GridViewColumn DisplayMemberBinding="{Binding ResultTitle}" Header="接口名" /> <GridViewColumn DisplayMemberBinding="{Binding ResultContent}" Header="结果" /> <GridViewColumn DisplayMemberBinding="{Binding STime}" Header="开始时间" /> <GridViewColumn DisplayMemberBinding="{Binding ETime}" Header="结束时间" /> <GridViewColumn DisplayMemberBinding="{Binding Address}" Header="地址" /> </GridView> </ListView.View> </ListView>
//后台 var listRes = new List<ResultData>(); //绑定到ListView中 lvList.ItemsSource = listRes;
个人小站: http://bbsspace.net/
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步