有没有办法判断 Windows 8.1 商店(XAML / C#)是否在 SplittView 中? 或者有没有获取当前显示器全屏宽度的方法?
ApplicationView.IsFullScreen
检查是否为全屏模式:using Windows.UI.ViewManagement
if (ApplicationView.GetForCurrentView().IsFullScreen)
{
// ...
}
else
{
}
并且可以通过Window.Bounds
获取精确的尺寸:
var width = Window.Current.Bounds.Width;
var height = Window.Current.Bounds.Height;
DisplayInformation
类 - http://msdn.microsoft.com/en-us/library/windows/apps/windows.graphics.display.displayinformation.aspx - w.b