I’ve created the following header for a ListView in WPF but the MouseUp events from both of the images don’t fire and I think it’s because the header is handling the mouse. Can I disable the header? Or somehow make the images handle the mouse up?

XAML:
<ListView>
<ListView.View>
<GridView>
<GridViewColumn>
<GridViewColumn.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Colmun1" VerticalAlignment="Center"/>
<Image Source="Edit.png" Width="24" Height="24" MouseUp="Image_MouseUp"/>
<Image Source="Cancel.png" Width="24" Height="24" MouseUp="Image_MouseUp"/>
</StackPanel>
</GridViewColumn.Header>
</GridViewColumn>
</GridView>
</ListView.View>
<ListViewItem Content="Test"/>
<ListViewItem Content="Test"/>
<ListViewItem Content="Test"/>
<ListViewItem Content="Test"/>
<ListViewItem Content="Test"/>
</ListView>
Try Mouse.PreviewMouseUp Attached Event
UPDATE
You’re right. It only works if you wrap the
Imageinto aButton.Maybe somebody else has a even better solution.