#271 – Changing a Window’s Resize Behavior

There are four different options for allowing a window to be resized.  You set the resizing behavior using the ResizeMode property.

The default value for ResizeMode is CanResize.  This results in the standard window border, allowing resizing by dragging the edge of the window.

<Window
	Width="300" Height="150" ResizeMode="CanResize">


The CanResizeWithGrip option is similar to CanResize, but the lower right corner of the window shows a little “grip” icon indicating that you can “grab” the window here to resize it.

<Window
	Width="300" Height="150" ResizeMode="CanResizeWithGrip">


The NoResize option creates a window that can’t be resized, minimized or maximized.  Notice that the minimize and maximize buttons have also disappeared.

<Window
	Width="300" Height="150" ResizeMode="NoResize">


The final choice for ResizeMode is CanMinimize, which creates a window that can’t be resized or maximized, but can be minimized.

<Window
	Width="300" Height="150" ResizeMode="CanMinimize">

About Sean
Software developer in the Twin Cities area, passionate about .NET technologies. Equally passionate about my own personal projects related to family history and preservation of family stories and photos.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: