How can I get a screen resolution of Device (Windows Phone)

前端 未结 4 1968
南方客
南方客 2020-12-20 13:39

How can I get a screen resolution of Device from settings (Windows Phone) ?

4条回答
  •  情歌与酒
    2020-12-20 14:23

    public void GetScreenResolution()  
    {  
         string ScreenWidth = Application.Current.Host.Content.ActualWidth.ToString();  
         string ScreenHeight = Application.Current.Host.Content.ActualHeight.ToString();  
         MessageBox.Show(ScreenWidth + "*" + ScreenHeight);  
    }  
    

提交回复
热议问题