[英]how to get combobox checkbox checked values in c# using wpf
<ComboBox.ItemTemplate>
<DataTemplate>
<CheckBox
Style="{StaticResource CheckBoxStyle}"
Content="{Binding CDM_VALUE1}" CommandParameter="{Binding}"
Command="{Binding ElementName=MyWindow, Path=DataContext.SetSelectAllCommand}"/>
</DataTemplate>
我在这里在复选框中作为项目模板给出了
您需要在XAML代码中添加参数IsChecked
IsChecked="{Binding Path=SetSelectAllCommand, Mode=TwoWay}"
该链接可能对您有所帮助。 如何使用MVVM获得选中的复选框值?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.