WPF捕捉/粘性窗口 [英] WPF Snapping / Sticky Window

查看:94
本文介绍了WPF捕捉/粘性窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我需要有关如何实现捕捉窗口以及同时移动窗口的建议.

我找到了一些示例代码,但还不完全是:捕捉代码

Hello,
I need advice on how to achieve snapping windows and at the same time be able to move the window.

I found some sample code but it's not quite it: Snapping code

推荐答案

WPF有一个专用的子论坛.绝对最好在那里问该问题:
https://social.msdn.microsoft.com/Forums/zh-CN/home?forum=wpf

WPF has a dedicated subforum. That question is definitely better asked there:
https://social.msdn.microsoft.com/Forums/en-US/home?forum=wpf

我找到了这个问题的旧C ++代码.应该适用于C#和WPF:
http://www.codeproject.com/Articles/6045/Sticky-Windows-如何制作您的顶级表单

I found this old C++ code for this problem. Should be adaptable to C# and WPF:
http://www.codeproject.com/Articles/6045/Sticky-Windows-How-to-make-your-top-level-forms-to

类似于对接容器,我认为如果没有一些第三方的东西和某些骇人听闻的方法,就无法做到这一点.窗口系统从未设计用于这种东西,但是可以使其表现得像它.

Similar to Docking Containers, I don't think it can be done without some thrid party stuff, and somewaht hacky methods. The Windowing system was never designed for this kind of stuff, but it can be made to behave like it.


这篇关于WPF捕捉/粘性窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆