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
  • 576
  • 1
  • 8
  • 27

1 Answers1

1

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
  • 23,806
  • 16
  • 84
  • 128