With the mouse, I move a MainWindow xaml image to a location on the screen. Then I click a button to open a dialog box.
The dialog box WindowStartupLocation="CenterScreen", probably needs to changed. What code is needed so the dialog box is placed on top of the MainWindow image location?
Sam HobbsPosted Apr 18, 2024, 2:47 AM
What do you mean by move? Do you mean that your program changes the x and y coordinates or do you mean the user uses the mouse to drag and drop the image?
What is a xaml image? I do not know what it is.
What do you mean by on top? Do you mean that you want the bottom of the dialog box to be at or above the top of the image?
As best as I understand your question, you simply need to get the coordinates of the image and then set the coordinates to be used for the dialog box accordingly. Note that there is a difference between screen coordinates and client coordinates.