获取屏幕真实的分辨率。

1
2
3
4
5
using Windows.Graphics.Display;

var displayInformation = DisplayInformation.GetForCurrentView();
var screenSize = new Size(displayInformation.ScreenWidthInRawPixels,
displayInformation.ScreenHeightInRawPixels);