[UWP] [XAML] [VB]可编辑列表框 [英] [UWP][XAML][VB]Editable ListBox

查看:80
本文介绍了[UWP] [XAML] [VB]可编辑列表框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ListBox,我希望用户能够从中选择一个或多个项目。我希望用户能够在ListBox中添加,删除和编辑项目(这些项目只是简单的Point对象,没有奇特的格式化类型)。我能够添加,编辑和
删除单个项目没有问题,但我在选择多个项目时遇到了麻烦。我有SelectionMode =" Extended"尽管它仍然不像CTRL和SHIFT键正在做他们通常在其他
Windows应用程序中做的事情。我希望用户能够做的一些事情是:

I have a ListBox which I want the user to be able to select 1 or more items from. I want the user to be able to add, delete, and edit items in the ListBox (the items are just simple Point objects, no fancy types of formatting). I am able to add, edit, and delete individual items with no problem, but I am having trouble when it comes to selecting multiple items. I have SelectionMode="Extended", although it still doesn't feel quite like the CTRL and SHIFT keys are doing what they normally do in other Windows apps. Some of the things I want the user to be able to do are:

•添加新商品

•编辑现有商品

•删除现有项目

•移动所选项目(如果选择了多个项目,则作为一个组)

•Add new items
•Edit existing items
•Delete existing items
•Move selected items (as a group if multiple items are selected)

我遇到问题的地方有多个选定项目和当以编程方式选择项目时(如果我使用SelectionMode ="Single"并且不关心以编程方式选择项目,我将能够完成所有事情)。
由于ListBox是Windows中一个非常常见且重要的控件,我认为大部分内容都非常简单,但此时我还没有对ListBox做过很多工作。如果有更简单的
方法,我不想过度复杂化我的应用程序的这一部分。有人有什么建议吗?谢谢。

The places where I am having trouble are with multiple selected items and when programmatically selecting items (I would be able to do everything perfect if I was using SelectionMode="Single" and didn't care about programmatically selecting items). Being that the ListBox is a very common and important control in Windows, I would think most of these things would be very simple, but I haven't done a lot with ListBox at this point. I don't want to overcomplicate this part of my app if there are simpler ways to do it. Does anybody have any suggestions? Thanks.

Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

推荐答案

Nathan Sokalski,

Hi Nathan Sokalski,

Telerik UWP的UI 现在是开源的。您可以考虑使用该库中的控件。例如:

RadListView
,它已经实现了一些有用的功能供你轻松使用。

The Telerik UI for UWP is now open source. You could think about using the controls in that library. For example: RadListView, it has implemented some useful functions for you to easily use.

无论如何,你必须自己实现一些功能。

Anyway, you would have to implement some functions by yourself.

最好的问候,

Xavier Eoro

Xavier Eoro


这篇关于[UWP] [XAML] [VB]可编辑列表框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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