ShowDialog or ShowDialogAsync not following center of page when resizing.

Answered
1
0

Hi everyone, i created a Window and im doing Window.ShowDialog / ShowDialogAsync (the same thing happens for both). I decided to center that form to the center when it first appears.

But when the user resizes the page, the form still stuck at the same spot, it doesnt have the “responsive” thing, it doesnt follow the responsive of the browser, it jsut keeps on the same position fixed. Is there any way to make the form follow the size of the browser?

 

Thanks everyone!

  • You must to post comments
Best Answer
1
1

Ruben,

what you describe as stuck is a normal window behavior, it keeps its position.
If you want to have the “responsive” thing, just set KeepCentered to true before showing the dialog:

https://docs.wisej.com/api/wisej.web/containers/form#keepcentered

Best regards
Frank

  • ruben ribeiro
    Worked! Thank you! Is there any option to set this globally? So i don’t have to do the KeepCentered = true everytime?
  • Alaa (ITG)
    Hi Ruben, the easiest you can do is you can have your own custom class that inherits the Form object, and then just set the KeepCentered property to true!
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.