Reputation: 3689
I want to prevent popup from being closing when User clicks on it. I tried it by override the OnPreviewMouseDown and setting e.Handled
to true
protected override void OnPreviewMouseDown(MouseButtonEventArgs e)
{
base.OnPreviewMouseDown(e);
e.Handled = true;
}
But doing this will not fire any mouse click event on child of Popup.
I also tried Popup.StaysOpen = true
But this also don't work(Popup closes on click).
Is there any way to prevent Popup from closing when user clicks on it???
Upvotes: 3
Views: 2346
Reputation: 13765
in your Xaml definition add this
<Popup StaysOpen="True"></Popup>
Upvotes: 0