在调用FilePicker API之前,我称之为:
async internal static Task<Boolean> EnsureUnsnapped()
{
// FilePicker APIs will not work if the app is snapped
var unsnapped = ApplicationView.Value != ApplicationViewState.Snapped;
if (!unsnapped) unsnapped = ApplicationView.TryUnsnap();
if (!unsnapped)
{
MessageDialog dlgLocFound = new MessageDialog("The picker cannot be displayed since the app cannot be unsnapped");
await dlgLocFound.ShowAsync();
}
return unsnapped;
}
...我来自&#34; Windows应用商店应用&#34;约翰加兰,第99页。
但我在第一行收到警告(&#34; ApplicationView.Value&#34;),即:&#34; &#39; Windows.UI.ViewManagement.ApplicationView.Value&#39 ;已过时:在Windows 8.1之后,版本的值可能会被更改或不可用。而是直接查询窗口布局大小。&#39; &#34;
好的,但是如何(我和#34;直接查询窗口布局大小&#34;)?