0

I'm creating my own DialogBox. How can I make this DialogBox always appear to the top right corner of my MainWindow? I mean the dialog box should move with the MainWindow like a conjoined twins.

Thx in advance.

Benjamin Martin
  • 506
  • 1
  • 8
  • 24

1 Answers1

0

You can use code from this answer to help you achieve your goal: How to set the location of a WPF window?

When you create a MyDialogBox, get the location of the current / main window and use that to help calculate where you should set the location of your MyDialogBox

Community
  • 1
  • 1
DLeh
  • 22,854
  • 15
  • 79
  • 121