Since you're treating an image like a button, why not make it a button with the image on it? As a test, if you replace an image with a button, you'll see that clicking a button that's on the header won't expand/collapse the Expander
.
You can just modify the button's template and it'll look like an image:
<Button>
<Button.Template>
<ControlTemplate>
<Border HorizontalAlignment="Center" VerticalAlignment="Center" >
<Image Source="/Pictures/graph_button.png" Width="24" Height="24"/>
</Border>
</ControlTemplate>
</Button.Template>
</Button
I also recommend learning about Commands and how you can bind to one to perform an action when you click the button.