Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minimize a window in WPF?

How do you minimize a window programmatically when using windows WPF? I can seem to find a .Resize attribute?

like image 672
Erika Avatar asked May 15 '10 18:05

Erika


People also ask

How to disable maximize Window in WPF?

By setting the ResizeMode property to CanMinimize only the Minimize button will be visible. The maximize button will be hidden and the resizing will be disabled.

How to disable minimize and maximize button for WPF Window?

In WPF you can indeed set the WindowStyle property of a Window to System. Windows. WindowStyle. ToolWindow to get rid of the minimize and maximize buttons completely, but the window will then look slightly different compared to when the property is set to its default value of SingleBorderWindow.

How to Hide button in WPF?

Visibility = Visibility. Collapsed; Hidden hides the button but the button will still take up space in the UI. Collapsed will collapse the button such that it has zero width and height.

How do I make my WPF Window full screen?

Just set the WindowState to Maximized , and the WindowStyle to None . Also setting the Window as topmost will make sure no other Window shows up over your window.


1 Answers

set WindowState = WindowState.Minimized;

like image 128
sean e Avatar answered Sep 22 '22 03:09

sean e