Tina Debove Nigro

Windows 10 APIs in a W8.1 app - Fullscreen mode

Windows 10 APIs in a W8.1 app - Fullscreen mode

A month ago, Microsoft announced a new Windows 10 SDK which provides hundreds of new APIs. I’ll publish several blog posts on some of them I’m already using in my W10 apps, however, some big apps like VLC can’t just forget about their W8.1 users (millions of them) and jump in the W10 train.

There is a challenge: how can we use some of those W10 APIs in a W8.1 app? By using reflection. At runtime we ask the OS to find properties that are not visible when compiling the app. If we manage to find those properties then we can use them.

The Windows 10 SDK provides two methods to enter and go out fullscreen mode:

var appView = ApplicationView.GetForCurrentView();
appView.TryEnterFullScreenMode();
appView.ExitFullScreenMode();

In order to get those APIs and use them in our apps we need to find the runtime properties:

var runtimeMethods = view.GetType().GetRuntimeMethods();

Then, a simple LINQ request will do the trick :)

The full source code and sample solution is available on GitHub here

Windows 10 APIs in a W8.1 app - Fullscreen mode
Prev post

An intro to VS Code

Next post

Centered alignment of GridView items

Windows 10 APIs in a W8.1 app - Fullscreen mode

Get in touch