Skip to content

Commit

Permalink
fix not working NCLBUTTONDBLCLK on top glow
Browse files Browse the repository at this point in the history
  • Loading branch information
punker76 committed Jul 20, 2016
1 parent d1f4cec commit e8843e0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions MahApps.Metro/Controls/GlowWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public GlowWindow(Window owner, GlowDirection direction)
break;

case GlowDirection.Top:
this.PreviewMouseDoubleClick += this.GlowWindowPreviewMouseDoubleClick;
this.glow.Orientation = Orientation.Horizontal;
this.glow.VerticalAlignment = VerticalAlignment.Bottom;
this.getLeft = (rect) => rect.left - 2;
Expand Down Expand Up @@ -150,6 +151,14 @@ public GlowWindow(Window owner, GlowDirection direction)
};
}

private void GlowWindowPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
if (this.ownerHandle != IntPtr.Zero)
{
Standard.NativeMethods.SendMessage(this.ownerHandle, Standard.WM.NCLBUTTONDBLCLK, (IntPtr)Standard.HT.TOP, IntPtr.Zero);
}
}

public Storyboard OpacityStoryboard { get; set; }

public override void OnApplyTemplate()
Expand Down

0 comments on commit e8843e0

Please sign in to comment.