开发者

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.status开发者_运维百科bar(v=VS.85).aspx

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


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:

  • StatusBar SizingGrip in WPF
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜