-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
What steps will reproduce this issue?
Open Popup menu of a SplitButton in the MahApps demo -> click on the Button (PART_Button) ->
click somewhere else in the MainWindow. Popup remains open.
If the click on the Button is skipped, everything works as expected.
This seems to be an issue with Mouse.Capture in the SplitButton class:
Adding Mouse.Capture(this, CaptureMode.SubTree); to ButtonClick within SplitButton class fixes the issue.
private void ButtonClick(object sender, RoutedEventArgs e)
{
e.RoutedEvent = ClickEvent;
RaiseEvent(e);
Mouse.Capture(this, CaptureMode.SubTree);
}
Expected outcome
Popup menu should close.
Environment
- MahApps.Metro v1.2.4
- Windows 7 x64
- Visual Studio 2013
- .NET Framework 4.5