wpf - change listbox items behavior like radio button in expression blend -


i have listbox.

i want have contentpresenter, image , rectangle in every item of listbox.

so decided create item template listbox.

now, have 2 items in contentpresenter.

  1. path of image ,

  2. color of rectangle.

so created sample data source , bind both path , color image source , rectangle fill respectively.

i have not directly binded rectangle fill color(value) of sample data source. have binded in rectangle's leftmousebuttondown event using changepropertyaction behavior.

now can change color of rectangle when click on rectangle.

but problem want change color of other rectangles initial color while click on rectangle. mean want them behave radio buttons.

this have :

enter image description here

this want :

enter image description here enter image description here


Comments