I wrote my own checkbox ContentControl for better design control.
What the scenario looks like:
I got a Listbox with custom templated list items, which, in turn, have a text item and my custom checkbox.
Wanted behaviour:
- clicking on the list item changes page to a detailed view of that item.
- clicking the checkbox only toggles the checkmark on it and does not trigger the page change.
Actual behaviour:
You may guess, when clicking on my checkbox, the page change event is still fired.
How I implemented that:
My checkbox has a Grid, which holds a Rectangle and an Icon. I bound a Tap event to the Grid, to toggle the IsChecked status. (Grid objects don't have a click event).
Is it because I'm not using a click event? If so, which interface does my ContentControl have to implement for it? Or how does the default Checkbox (Button?) control manage that?
Thanks for your help.