Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launch WPF on Secondary Display?

Tags:

Is there a simple way to cause a (full screen) WPF app to launch on a secondary display? I know I could get the entire virtual desktop rectangle and calculate an offset, but is there a more direct way?

like image 962
TwoPixelGrid Avatar asked Apr 02 '09 20:04

TwoPixelGrid


1 Answers

AFAIK there is currently no way to do this purely with WPF.

However you should be able to:

  • Use the System.Windows.Forms.Screen class to get information about the screen(s)

  • Reposition your window:

    Application.Current.MainWindow.Left = xxx;
    Application.Current.MainWindow.Top = yyy;

like image 118
Konstantin Tarkus Avatar answered Oct 12 '22 08:10

Konstantin Tarkus