I want to close a tab in my tab control when the mouse wheel is clicked. How can I capture this event in WPF?
EDIT: Here's the code:
private void tabMain_MouseDown(object sender, MouseButtonEventArgs e)
{
if(e.ChangedButton == MouseButton.Middle && e.ButtonState == MouseButtonState.Pressed)
{
MessageBox.Show("Middle button clicked");
}
}
ButtonState == ButtonState.Pressed
inMouseDown
event? Or it was just a copy/paste from somewhere? – Selena