How do I know what monitor a WPF window is in

If the window is maximized then you cannot rely on window.Left or window.Top at all since they may be the coordinates before it was maximized. But you can do this in all cases:

    var screen = System.Windows.Forms.Screen.FromHandle(
       new System.Windows.Interop.WindowInteropHelper(window).Handle);

Leave a Comment