midspace
midspace

Reputation: 964

How do you create a Drag Thumb on a WPF Window Status bar?

I suppose I might be looking for too simple an answer, but in WinForms, the StatusBar had a thumb on the right hand side, that allowed the user to resize the form quicker without having to try and grab the border.

I am looking for a simple built in solution in WPF which replicates this visually and functionally that will resize the entire WPF Window. Been googling but it's always off

The MSDN article on the StatusBar class actually shows an image with a thumb on in, but by default there is no thumb on the StatusBar.

MSDN article: http://msdn.microsoft.com/en-us/library/system.windows.controls.primitives.statusbar(v=VS.85).aspx

Statusbar image with thumb on it: http://i.msdn.microsoft.com/dynimg/IC19326.gif

Upvotes: 2

Views: 1390

Answers (1)

Rick Sladkey
Rick Sladkey

Reputation: 34240

It's a little counter-intuitive if you're coming from WinForms but the solution is very simple by using Window.ResizeMode:

<Window ...  ResizeMode="CanResizeWithGrip">

This works with or without a status bar.

Here's an article with more information:

Upvotes: 3

Related Questions