In WPF / C#, how can I check if the center button is clicked or released?
c#, mouseclick-event, wpf
Solution
Use the MouseDown/MouseUp event and check the MouseButtonEventArgs:
private void control_MouseDown(object sender, MouseButtonEventArgs e)
{
if (e.ChangedButton == MouseButton.Middle)
{
}
}
Problem
In WPF / C#, there are events on MouseRightButtonDown and MouseLeftButtonDown, but what about the center mouse button? Is the Center Mouse button down/up e.g. events in WPF forgotten? How can I check if the center button is clicked or released?