是否有任何原生WPF多选组合框可用? [英] Is there any native WPF Multiselect combobox available?

查看:198
本文介绍了是否有任何原生WPF多选组合框可用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即使是第三方也可以。

感谢

推荐答案

p> WPF中没有本地多选择组合框。请检查我的博客一个简单的黑客使用表达式混合来实现多选择组合框。
http://jobijoy.blogspot.com/ 2009/02 / simple-multiselect-combobox-using.html
这个想法是通过编辑控件模板,使用ListBox的多选择功能到组合框中。

There is no native multiselect combobox in WPF. Please check my blog for a simple hack using expression blend to achieve a multi selection on combobox. http://jobijoy.blogspot.com/2009/02/simple-multiselect-combobox-using.html The idea is to utilize the Multi-Selection feature of ListBox in to ComboBox by editing the control template.

但是对于访问所选项目,您可能需要使用代码中的下划线。

But for accessing the selected items you might need to use the bellow line in the code.

((ListBox)cmbBox.Template.FindName("lstBox",cmbBox)).SelectedItems

其中 > cmbBox 是您的组合框, lstBox 是controltemaplate中的ListBox。

Where cmbBox is your combobox and lstBox is the ListBox inside the controltemaplate.

这篇关于是否有任何原生WPF多选组合框可用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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