c# - WPF maximize main window with center for application -
i have wpf application , want maximize main window. tried below code issue window maximized not centered. want window maximized maximize window mouse click. code is:
mainwindow.height = systemparameters.maximizedprimaryscreenheight; mainwindow.width = systemparameters.maximizedprimaryscreenwidth;
set windowstate property instead of width , height:
mainwindow.windowstate = windowstate.maximized;
Comments
Post a Comment