简体   繁体   English

拖放 combobox 中的项目

[英]Drag and drop items in combobox

How can I drag and drop items in combobox to change their order?如何拖放 combobox 中的项目以更改其顺序? ( https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.combobox?view=winrt-19041 ) https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.ZA8284521647549D6ECBB00383A3C248BDZ?view=winrt-1

How can I drag and drop items in combobox to change their order?如何拖放 combobox 中的项目以更改其顺序?

I'm afraid you can't implement this feature, because Combobox use ItemsPresenter to display items, but ItemsPresenter does not contains reorder feature.恐怕您无法实现此功能,因为Combobox使用ItemsPresenter来显示项目,但ItemsPresenter不包含重新排序功能。 If you want to change items order, there only way is that change the data source's order.如果要更改项目顺序,唯一的方法是更改数据源的顺序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM