views:

204

answers:

0

Hi,

I have a combobox whose ItemTemplate is a Checkbox. This is checkbox is bound to an object which has a bool and a string. The checkbox checked state is bound to the bool and the content is bound to the string.

I want a select all option at the top of the combobox collection, which has an indeterminate state, according to the other items in the collection.

x [Select All]

x Object1

x Object2

How can I access the checkbox from the datatemplate from all items in the combobox? I.e.

foreach ( object in ComboBox.items )

{

// get the object checkbox from the datatemplate so i can set the state to be indeterminate if it is the first item.

}

Is this possible?

Thanks,

U.