wpf combobox with checkbox - selecteditem

前端 未结 2 1478
忘掉有多难
忘掉有多难 2021-01-06 23:28

I have a simple ComboBox with CheckBoxes as Items. How can I prevent the actual selection of the items. The user should only be able to check or uncheck the checkboxes?

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-07 00:14

    What about if you change your ComboBox to ItemsControl:

    
        
          
          
        
      
     
    

    Having an ItemsControl instead of a ComboBox will display all the items only checkable.

提交回复
热议问题