Screen Resolution Problem In WPF?

后端 未结 8 1220
孤城傲影
孤城傲影 2020-11-30 00:13

I\'m gonna detect the resolution with the following code in WPF :

double height = System.Windows.SystemParameters.PrimaryScreenHeight;
double width = S         


        
相关标签:
8条回答
  • 2020-11-30 00:52

    try these..i believe this could correct the error.....

    System.Windows.Form1.Screen.PrimaryScreen.Bounds.Height; System.Windows.Form1.Screen.PrimaryScreen.Bounds.Widtht;

    0 讨论(0)
  • 2020-11-30 00:54

    Try SystemParameters.FullPrimaryScreenWidth and FullPrimaryScreenHeight, I believe PrimaryScreenWidth and Height returns size of available client window after removing the taskbar and other deskbands on your screen.

    0 讨论(0)
提交回复
热议问题