WPF에는 Secondary Monitor, 3rd monitor 등등을 찾아주거나 그 정보를 알려주는 것이 현재 없는 걸로 알고 있다.
그래서 영역을 설정하고 세컨더리 모니터에 그릴 윈도우 위치와 맞춰주는 방법을 써보기로 하자.
private playerWindow PlayerWindow = new playerWindow();
private void SecondaryMonitorLocation()
{
PlayerWindow.WindowStartupLocation = WindowStartupLocation.Manual;
System.Drawing.Rectangle workingArea = System.Windows.Forms.Screen.AllScreens[1].WorkingArea;
PlayerWindow.Left = workingArea.Left;
PlayerWindow.Top = workingArea.Top;
PlayerWindow.Width = 800;
PlayerWindow.Height = 600;
그래서 영역을 설정하고 세컨더리 모니터에 그릴 윈도우 위치와 맞춰주는 방법을 써보기로 하자.
private playerWindow PlayerWindow = new playerWindow();
private void SecondaryMonitorLocation()
{
PlayerWindow.WindowStartupLocation = WindowStartupLocation.Manual;
System.Drawing.Rectangle workingArea = System.Windows.Forms.Screen.AllScreens[1].WorkingArea;
PlayerWindow.Left = workingArea.Left;
PlayerWindow.Top = workingArea.Top;
PlayerWindow.Width = 800;
PlayerWindow.Height = 600;
// 이 사이에 취향에 따라 윈도 스타일 및 상태 넣어줘도 되고..
// 해당 윈도를 최상위로 놓고자 한다면 TopMost 속성을 true로 놓을 것.
// 해당 윈도를 최상위로 놓고자 한다면 TopMost 속성을 true로 놓을 것.
PlayerWindow.Show();
}
}
'Coding > WPF, Silverlight' 카테고리의 다른 글
WPF에서 Font ComboBox 만들기 (0) | 2009.08.12 |
---|---|
WPF Threads (0) | 2009.08.09 |
WPF Thread // 작성자 : Shwan Wildermuth (0) | 2009.07.19 |