Skip to content

Commit

Permalink
https://github.com/xceedsoftware/wpftoolkit/issues/1400
Browse files Browse the repository at this point in the history
Checking if the mouse is outside the bounds of the DropDownButton when the PreviewMouseDownOutsideCapturedElement event tunnels through it to prevent the DropDownButton's Popup from closing if the event is caused by a child Popup
  • Loading branch information
Dirkster99 committed Dec 13, 2018
1 parent 8f66b7a commit 26d7aae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/DropDownButtonLib/Controls/DropDownButton.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,8 @@ private void OnKeyDown(object sender, KeyEventArgs e)
/// <param name="e"></param>
private void OnMouseDownOutsideCapturedElement(object sender, MouseButtonEventArgs e)
{
this.CloseDropDown(false);
if( !IsMouseOver )
CloseDropDown( true );
}

/// <summary>
Expand Down

0 comments on commit 26d7aae

Please sign in to comment.