本文介绍了C#中ListView项的子项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经通过xaml文件创建了一个列表视图,并向其中添加了项目.如何在该列表视图中添加子项?我没有获得subitems属性.请帮助我
这是我用于创建Listview的代码.
Hi I have created a listview through xaml file and have added items to it. How to add subitems to that list view? I am not getting subitems property. Pls help me
This is my code for Listview creation.
<ListView Height="228" HorizontalAlignment="Left" Margin="284,79,0,0" Name="lsvAnalysts" VerticalAlignment="Top" Width="381" SelectionChanged="lsvAnalysts_SelectionChanged"/>
这是我向其中添加项目的代码
This is my code for adding items to it
lsvAnalysts.Items.Add("1");
lsvAnalysts.Items.Add("2");
推荐答案
这篇关于C#中ListView项的子项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!