To prevent the window from being moved or resized, process the WM_WINDOWPOSCHANGING message in WndProc . Using WM_WINDOWPOSCHANGING prevents windows from moving even on Win + Shift + Left . The following is an example of an attached property that adds this behavior.
This can be combined with WindowStyle and ResizeMode so that the window also looks stationary.
using static NativeMethods; public class WindowPos : DependencyObject { public static bool GetIsLocked(DependencyObject obj) { return (bool)obj.GetValue(IsLockedProperty); } public static void SetIsLocked(DependencyObject obj, bool value) { obj.SetValue(IsLockedProperty, value); } public static readonly DependencyProperty IsLockedProperty = DependencyProperty.RegisterAttached("IsLocked", typeof(bool), typeof(WindowPos), new PropertyMetadata(false, IsLocked_Changed)); private static void IsLocked_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e) { var window = (Window)d; var isHooked = d.GetValue(IsHookedProperty) != null; if (!isHooked) { var hook = new WindowLockHook(window); d.SetValue(IsHookedProperty, hook); } } private static readonly DependencyProperty IsHookedProperty = DependencyProperty.RegisterAttached("IsHooked", typeof(WindowLockHook), typeof(WindowPos), new PropertyMetadata(null)); private class WindowLockHook { private readonly Window Window; public WindowLockHook(Window window) { this.Window = window; var source = PresentationSource.FromVisual(window) as HwndSource; if (source == null) {
Usage example:

Mitch source share