I've been working on using P/Invoke (post to follow) for multi-monitor support with Silverlight 5. Whilst playing, I noticed that window size and position would determine which of my two monitors an additional Window was maximised onto. I continued playing (as you do) and determined that:
- with my laptop (1280 x 800) on the left as primary and monitor (1024 x 768) on the right, the formula was Left = -(Width/2) + 1271
- with my monitor (1024 x 768) on the left as primary and laptop (1280 x 800) on the right, the formula was Left = -(Width/2) + 1014
- with my monitor (1024 x 768) on the left and laptop (1280 x 800) on the right as primary, the formula was Left = -(Width/2) - 11
- with my laptop (1280 x 800) on the left and monitor (1024 x 768) on the right as primary, the formula was Left = -(Width/2) - 10
It looks like there should be a pattern (constant = screen width - 10 for primary on the left, constant = -10 for primary on the right) but it's not exact. I don't have other monitors available at the moment, to check. Anyone know what it should be, or if this is just an artefact of my particular set up?
(Note: there are limits to these - they don't work for all value of Left or Width)