问题
I looked at this thread to create a dual monitor application in WPF: http://social.msdn.microsoft.com/forums/en-US/wpf/thread/5d181304-8952-4663-8c3c-dc4d986aa8dd where a WPF Window will be displayed on each of the two monitors.
The issue I am having is that the windows are overlapping - they are both being displayed on the same screen. The Debugger tells me that there are 2 Displays in the System.Windows.Forms.Screen.AllScreens array and that the Top and Left values of the working areas of each screen are 0, -1600 and 0, 0 respectively (which seem to be accurate to me).
Both screens have a resolution of 1600x1200.
Has anyone come across a similar issue before? The monitors are set to 'Extend desktop to this display' in the Screen resolution settings.
Thanks!
回答1:
I managed to display a window in the second monitor (placed at the right of the primary) by using the following code:
window.Left = System.Windows.SystemParameters.VirtualScreenWidth / 2;
来源:https://stackoverflow.com/questions/13689644/wpf-dual-monitor-application-overlay