Get Screen Resolution in Win10 UWP App

前端 未结 7 2309
刺人心
刺人心 2020-11-28 08:54

As an UWP App runs in window mode on common desktop systems the \"old\" way of getting the screen resolution won\'t work anymore.

Old Resolution with Window.C

相关标签:
7条回答
  • 2020-11-28 09:32

    The only way I found is inside the constructor of a Page:

     public MainPage()
        {
            this.InitializeComponent();
    
            var test = ApplicationView.GetForCurrentView().VisibleBounds;
        }
    

    I have not tested in Windows 10 Mobile, when the new release appears I will test that.

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