问题
Possible Duplicate:
disable Aero Snap (wpf)
I have an application in C# WPF. I want the main window to have fixed size. To achieve this, I have set the height and max height, width and max width, to the same values. Everything looks fine, but I want also to disable Aero snap effect for this window only.
The solution to disable Aero snap from Windows Registry or Control Panel is excluded.
Setting the ResizeMode of the window to "NoResize" is also excluded, because in this way the window border dissapear too.
Do you have any working solution for this problem in C# ?
Thank you very much.
回答1:
You can try to change the ResizeMode
to NoResize
only temporarily as explained in this answer.
Otherwise you can try this trick also but I haven't tried it myself.
回答2:
I have finally found a solution, after 2 days of searching all over the Internet.
http://programminghacks.net/2009/10/19/download-snapping-sticky-magnetic-windows-for-wpf
Unfortunately it does not work with borderless windows.
来源:https://stackoverflow.com/questions/11432280/c-sharp-disable-aero-snap-for-wpf-window