How to center a wpf App/ Window ?

c# wpf ui csharp 4 years, 9 months ago
namespace KoderPLace { public partial class Window1 : Window { public Window1() { WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; InitializeComponent(); } } }
1007
Instructions

//This is the main line suppose to be in the code behind file before the initialization of component.
WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;

Posted By