Created window. UserControl is loaded into it by default, when I click one button to change one control to another, it is not displayed in the center. Although the window mapping property is set in the center.
The question is how to dynamically change UserControls to display the window again in the center? The size of the window is adjusted to the contents of the UserControl Now the behavior is this: when you first start everything is fine, as soon as I press the registration button, the window simply expands and takes shape not in the center.