0

what is the way to make a Window WPF Topmost true from a Page.xaml? my code is:

        MainWindows ui = new MainWindows();
        private void TopMostCheckBox_Checked(object sender, RoutedEventArgs e)
        {
             ui.Topmost = true;
        }

this actually dont work, and i dont know how to fix exactly

it should to make the window topmost value true but nothings happen, maybe the Page is the problem?

me_d
  • 1
  • Does this answer your question? [How to make a WPF window be on top of all other windows of my app (not system wide)?](https://stackoverflow.com/questions/2546566/how-to-make-a-wpf-window-be-on-top-of-all-other-windows-of-my-app-not-system-wi) – Siegfried.V Nov 22 '22 at 04:16
  • You are creating a new MainWindow (while the real one is probably already running?), and then you do not `.Show()` it. – Stefan Wuebbe Nov 22 '22 at 08:00

0 Answers0