Terminador Terminador - 1 year ago 107
C# Question

Double-click event on WPF Window border

Is there any event which fires on double-click event on WPF Window border?

How I can catch it?


Answer Source

Here is one way.. Just set your Window.WindowStyle to "None" and create your down window border:

        MouseLeftButtonDown="border1_MouseLeftButtonDown" />

In code behind:

private void border1_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
    if (e.ClickCount == 2)
       MessageBox.Show("Double Click");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download