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

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -