2014-03-13 52 views

回答

3

您可以檢查它是否是全屏通過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; 
+0

Window.Current.Bounds給我窗口的大小;不是屏幕。所以如果應用程序在SplittView中,我無法知道顯示器寬度是什麼,對吧? –

+0

只需在全屏顯示應用程序時進行檢查,您還可以看到「DisplayInformation」類 - http://msdn.microsoft.com/en-us/library/windows/apps/windows.graphics.display.displayinformation.aspx –

相關問題