I have the following code (only relevant snippets)
You need to use DataTrigger, and set the style property of the two panels to the IsChecked propery of the checkbox, here an example