ListBox和ListView有什么区别 [英] What is The difference between ListBox and ListView

查看:991
本文介绍了ListBox和ListView有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WPF的ListBox和ListView有什么区别?我找不到它们的属性有任何显着差异。

What is the difference between WPF's ListBox and ListView? I can not find any significant difference in their properties. Is there different typical use?

推荐答案

一个 ListView 基本上就像一个 ListBox (并从中继承),但它还具有 View 属性。此属性使您可以指定显示项目的预定义方式。 BCL中唯一的预定义视图(基类库)是 GridView ,但您可以轻松地创建自己的

A ListView is basically like a ListBox (and inherits from it), but it also has a View property. This property allows you to specify a predefined way of displaying the items. The only predefined view in the BCL (Base Class Library) is GridView, but you can easily create your own.

另一个区别是默认选择模式:对于 Single > ListBox ,但扩展以获得 ListView

Another difference is the default selection mode: it's Single for a ListBox, but Extended for a ListView

这篇关于ListBox和ListView有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆