mercredi 2 janvier 2019

How to check Checkboxes in XAML?

I have a list of objects as an ObservableCollection<MyObject>. I am already able to display the name property of these objects in a combobox using XAML.

Now I have another object AnotherObject which has a property that is defined as a list of strings and each item of that list is the name property of MyObject mentioned above.

In the combobox I want to display the MyObject.name property preceeded by a checkbox. Let's say that there are 30 items in the checkbox and an instance of AnotherObject.names holds three of them. Now I want select the checkboxes of those items that are equal to the three items in AnotherObject.names.

How can I achieve this?




Aucun commentaire:

Enregistrer un commentaire