您好,
您说得这个API是在UWP中才可以用的,而在windows 8.1中是没有现成的API给你用的。
你可以用反射技术去调用windows 10 的API.
请参考我的代码:
private void Button_Click(object sender, RoutedEventArgs e)
{
var view = ApplicationView.GetForCurrentView();
var runtimemethods = view.GetType().GetRuntimeMethods();
if (!view.IsFullScreen)
{
var TryEnterFullscreenMode = runtimemethods.FirstOrDefault(x => x.Name == "TryEnterFullScreenMode");
TryEnterFullscreenMode?.Invoke(view, null);
}
}
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.