开发者

WPF control listview

ID     |  Name     | Address
----------------------------------
1      | Gia Ngoc  | Vietnamses 
2      | Jerry     | US

How to add lines like in the diagram above to a ListVie开发者_JAVA技巧w?

Thanks


Edit: If you mean to add a visual seperators between the columns you probably need to implement your own view by inheriting from ViewBase since the GridView does not seem to be very customizable.

(Below i assumed that you wanted to add rows)


You need to set the ListView.View to a GridView and define columns for it.

<ListView ItemsSource="{Binding Data}">
    <ListView.View>
        <GridView>
            <GridViewColumn Header="ID"      DisplayMemberBinding="{Binding Id}"/>
            <GridViewColumn Header="Name"    DisplayMemberBinding="{Binding Name}"/>
            <GridViewColumn Header="Address" DisplayMemberBinding="{Binding Address}"/>
        </GridView>
    </ListView.View>
</ListView>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜