I want to change the page width and height in page loaded, When I change the size the page size change but the windows does not appear in center screen, Even when I but in xaml code :
WindowStartupLocation="CenterScreen"
The code I used in code behind in window load is:
this.Width = 1366;
this.Height = 768;
This Answer provide a method to center window Programmatically, But I wonder why the following do not work :
this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
Any suggest Thanks