Skip to content

Commit

Permalink
Ensure the TextEnhancementView.xaml is always shown on top
Browse files Browse the repository at this point in the history
  • Loading branch information
haefele committed Oct 26, 2023
1 parent 54afb3d commit 3bbef17
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ private void TextEnhancementView_OnLoaded(object sender, RoutedEventArgs e)
// Place the window a bit moved to the top, so it is perfectly centered if we reach this.MaxHeight
window.Top = Math.Max((currentScreenHeight - this.MaxHeight) / 2, 0);
}));

// Ensure window is shown above all other windows
window.Activate();
window.Topmost = true;
window.Topmost = false;
window.Focus();
}

private void TextEnhancementView_OnDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
Expand Down

0 comments on commit 3bbef17

Please sign in to comment.