How I can get screen orientation?

前端 未结 1 655
旧巷少年郎
旧巷少年郎 2021-02-11 00:27

I\'m entering number of screen on which I want to show the form. And I must get screen orientation. Does anybody know how to do that?

 public UIManager(int scre         


        
1条回答
  •  无人及你
    2021-02-11 00:47

    You can use the value from the Windows.Graphics.Display.DisplayInformation class, returned by DisplayInformation.getForCurrentView() and its currentOrientation property:

     DisplayOrientations currentOrientation = Windows.Graphics.Display.DisplayProperties.CurrentOrientation;
    

    From the official doc: DisplayOrientations enumeration

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