How to center a wpf App/ Window ?

c# wpf ui csharp 5 years, 5 months ago
namespace KoderPLace { public partial class Window1 : Window { public Window1() { WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; InitializeComponent(); } } }
1175
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