Get Screen Resolution in Win10 UWP App

前端 未结 7 2334
刺人心
刺人心 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:30

    Just set a name for main Grid or Page and call its width or height for an element you want:

    Element.Height = PagePane.Height;
    Element.width = PagePane.Width;
    

    it's the easiest way you can use!

提交回复
热议问题