0
votes

I am using Caliburn Micro, My UserControl(Window) is intially in Center Screen but as content loaded into it dynamically, its size increases.

So i want to make the window in Centre Screen when it resizes.

1
While this idea may sound good at first, the real-world usability is awful. What will happen when the user moves the window to a different area of the screen and then more content is loaded into the window? Should the window move back to the center of the screen?Metro Smurf
So when does it move to the centre of the screen?devdigital
i have an grouped datagrid.. when i expand that datagrid rows.its size gets changed. at that time, i need to update the window to centreKishore Kumar

1 Answers

4
votes

While I do not agree with the usability of moving a window in general, here is what you'd do to re-center your window if the window has been resized:

  1. Create a SizeChanged event handler.
  2. In the event handler, re-center the window