Update: It was an internal problem. I created a fresh WPF app and tried multi monitor setup with borderless, noresize, nomove window. It all worked fine.
The problem occurs if you're parenting your window to the Desktop. I will inspect further and update this question.
Original Question:
I'm setting Window.Left and Window.Top to WorkingArea.Left and WorkingArea.Top which I get using System.Windows.Forms.Screen.AllScreens. The window is borderless, noresize, nomove window with a fixed width. By setting these values I anchor the window to the left edge of the screen. I need to be able to do this on multiple monitors but I can't get it to work.
I have a ComboBox where you can select the monitor you want the window to appear on. Once the user selects the monitor, I read its WorkingArea.Left and WorkingArea.Top values and position my window accordingly.
I have a 2 monitors. When the primary monitor is the one on the left, the coordinates I get using WorkingArea are WorkingArea.Left = 0 for the left (primary) monitor and WorkingArea.Left = 1920 for the right (secondary monitor). Positioning works properly.
However, when the primary monitor is the one on the right, the now secondary left monitor reports WorkingArea.Left = -1920. When I set Window.Left to that value, my window just disappears.
Here is the monitor setup:
I tried adding different values to Window.Left such as moving it with increments of 128 pixels, I do manage to get it to show on the Secondary Left monitor once it reaches Window.Left = 0 but it can never show on the Primary Right monitor. At WorkingArea.Left = 1792, the edge of my window shows on the primary right monitor, but once it hits 1920 it disappears again.
Why can't I reposition the window to a negative value when the monitor reports a negative WorkingArea.Left?
Why would WorkingArea.Left = 0 show the window on the left edge of the Secondary Left monitor when the WorkingArea.Left reported for that monitor is -1920?
