Clyde Eisenbeis

Clyde Eisenbeis

  • 1.7k
  • 63
  • 11.9k

Window WPF location on a MainWindow image location? - Continued #2

Apr 18 2024 1:02 PM

C# wpf --- This is a "continuation" of c-sharpcorner.com/forums/code-for-placing-a-dialog-box-on-top-of-a-mainwindow-image-location.

When I run a program (.exe) a MainWindow image appears centered the screen (WindowStartupLocation="CenterScreen").  With a mouse, I drag MainWindow image to a different location on the screen. 

Then I click a button to open a dialog box (Windows WPF -> xaml file and xaml.cs file).  That dialog box also appears on the middle of the screen (WindowStartupLocation="CenterScreen"). 

What code is needed so the dialog box is placed on top of the new MainWindow image location?

 


Answers (1)