How to access a Checkbox inside Listbox?

前端 未结 5 1885
没有蜡笔的小新
没有蜡笔的小新 2021-01-03 14:40

I have a listbox and I have set the itemstemplate as shown below.

XAML:

            
                       


        
5条回答
  •  甜味超标
    2021-01-03 15:19

    Binding the IsChecked property to a boolean property on your object instance contained within DataList would be the simplest and cleanest way. Alternatively, if you want to avoid code behind, then you could write an attached property.

提交回复
热议问题