Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何在WPF中的组合框中实现多重选择_C#_Wpf_Checkbox_Combobox - Fatal编程技术网

C# 如何在WPF中的组合框中实现多重选择

C# 如何在WPF中的组合框中实现多重选择,c#,wpf,checkbox,combobox,C#,Wpf,Checkbox,Combobox,我是新的WPF,我正在寻找一个下拉框选择多个值。下拉列表的来源将来自一个列表。使用WPF Extended Tookit它可能会帮助您 这里是链接 用法 <xctk:CheckComboBox x:Name="_combo" HorizontalAlignment="Center" VerticalAlignment="Center" DisplayMem

我是新的WPF,我正在寻找一个下拉框选择多个值。下拉列表的来源将来自一个列表。

使用WPF Extended Tookit它可能会帮助您

这里是链接

用法

 <xctk:CheckComboBox x:Name="_combo" 
                     HorizontalAlignment="Center" 
                     VerticalAlignment="Center" 
                     DisplayMemberPath="Color"
                     ValueMemberPath="Level"
                     SelectedValue="{Binding SelectedValue}"
                     SelectedItems="{Binding SelectedItems}" />

SelectedItems为只读,以获取所选项目IList

 <xctk:CheckComboBox x:Name="_combo" 
                     HorizontalAlignment="Center" 
                     VerticalAlignment="Center" 
                     DisplayMemberPath="Color"
                     ValueMemberPath="Level"
                     SelectedValue="{Binding SelectedValue}"
                     SelectedItemsOverride="{Binding SelectedItems}"

重复@Mohamed感谢更新我按照说明尝试了此操作,但“SelectedItems”选项不可用。