Skip to content

Commit

Permalink
Disable page refreshing (#1298)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nice3point authored Dec 25, 2024
1 parent baa55d4 commit 397739b
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,23 @@ protected override void OnMouseDown(MouseButtonEventArgs e)
if (e.ChangedButton is MouseButton.XButton1 or MouseButton.XButton2)
{
e.Handled = true;
return;
}

base.OnMouseDown(e);
}

protected override void OnPreviewKeyDown(KeyEventArgs e)
{
if (e.Key == Key.F5)
{
e.Handled = true;
return;
}

base.OnPreviewKeyDown(e);
}

protected virtual void OnNavigating(System.Windows.Navigation.NavigatingCancelEventArgs eventArgs)
{
NotifyContentAboutNavigatingTo(eventArgs.Content);
Expand Down

0 comments on commit 397739b

Please sign in to comment.