Possible Duplicate:
How do you disable Aero Snap in an application?

Is there a way to prevent a WPF window from snapping to screen edges (i.e. Aero snap)?

I know this can be disabled by the user in the OS, but I want to prevent only my window from getting rearranged.

For example, modal windows do not get snapped like that. I imagine it can be set for a WPF window as well, but I do not know how.

有帮助吗?

解决方案

There's no direct way of doing this except you set ResizeMode="NoResize" and implement the resize behavior manually or EXTREME SOLUTION could be (on an application basis) modifying a shortcut to your .exe, on the Compatibility tab, check "Disable desktop composition".

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top