如何在.Net4中将selectionMode设置为MultiExtended [英] how do I set selectionMode to MultiExtended in .Net4
问题描述
大家好,
我使用Visual Studio 2010和.net4。
在.Net4.5中,listBox的选择模式为MultiExtended。
我无法在.Net4中找到等效属性。
您能否一次定义我可以为多个选择做些什么。
请注意:
我尝试过.Net4中提供的多种,扩展和单一选择模式,但不幸的是它们都没有用于我的项目
我无法下载.net4.5因为我使用visual studio 2010,我找不到Visual Studio 2010的任何.Net4.5更新
谢谢
Hi everyone,
I use Visual Studio 2010 and .net4.
In .Net4.5 there is a selectionMode for listBoxes as MultiExtended.
I couldnt find a equivalent attribute in .Net4.
Could you please define what can i do for multiple Selection at a time.
please note:
I have tried selection modes Multiple,Extended and Single that are available in .Net4, but unfortunatelly all of them are not available for my project
I can not download .net4.5 since i use visual studio 2010, i could not find any .Net4.5 update for visual studio 2010
Thanks
推荐答案
如果你说的是自.NET 1.1以来可用于WinForms的标准 Microsoft ListBox控件,那么你就错了:那个控件确实暴露了''SelectionMode属性的多扩展选项。
编辑:OP透露这是关于WPF ListBox的问题。
WPF ListBox提供SelectionMode.Extended;它没有提供'MultiExtended:我相信WPF扩展模式功能的方式可能与WinForms MultiExtended Mode功能不同,但我不使用WPF,并且我不确定。
您可以比较WinForms MultiExtended行为:
1.选择Control或Shift键何时关闭,鼠标点击项目
2.选择何时鼠标停止并拖动未选择的项目
你自己,并评估差异
If you are speaking of the standard Microsoft ListBox Control for WinForms available since .NET 1.1, then you are mistaken: that Control does expose a 'MultiExtended option for the 'SelectionMode property.
OP has revealed this is a question about the WPF ListBox.
The WPF ListBox provides a SelectionMode.Extended; it does not provide 'MultiExtended : I believe that the way that WPF Extended Mode functions may be different from the WinForms MultiExtended Mode funtionality, but I do not use WPF, and am not certain of that.
You can compare the WinForms MultiExtended behavior:
1. Select when Control, or Shift key is down, and mouse clicks item
2. Select when mouse is down and dragged over un-selected item
Yourself, and evaluate the difference
这篇关于如何在.Net4中将selectionMode设置为MultiExtended的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!