[英]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.