0

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.

Community
  • 1
  • 1
IneedHelp
  • 1,630
  • 1
  • 27
  • 58

1 Answers1

3

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

Erre Efe
  • 15,387
  • 10
  • 45
  • 77
  • Please don't do that. Don't tell Windows your window cannot be resized unless it cannot be resized. It doesn't play nice with other programs that want to resize the windows on the user's behalf. –  Sep 18 '12 at 14:08
  • @hvd I don't say do that, I say it's the only "easy" way :) – Erre Efe Sep 18 '12 at 14:09