Question

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.

Was it helpful?

Solution

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".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top