开发者

How to do minimize window in WPF, when user drag window from the top?

开发者 https://www.devze.com 2023-03-31 18:32 出处:网络
I implemented a custom window in WPF. It is possible to drag this window. So when i drag it to the top it maximizes. But than, when I drag this from the top, it should minimize - but it\'s not.

I implemented a custom window in WPF. It is possible to drag this window. So when i drag it to the top it maximizes. But than, when I drag this from the top, it should minimize - but it's not.

It is able to drag, but size is the same as maximize.

I'm looking for event which is called, when user dr开发者_开发百科ag window from maximize state, so i could call minimize function from code.

I can't find this event. Thanks for help.


Shouldn't you leave this kind of functionality up to Windows? Windows 7 will handle most such gestures automatically (such as maximizing when dragging it to the top, cascading when dragging it to the side, etc).

What you want to achieve, however, is not standard behavior and I have never seen a program behave like that ever.

I would ask myself this: Is this really a functionality I want? Personally I would not do this unless there are very good reasons to do so

0

精彩评论

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

关注公众号