How to compute the TitleBar height on Windows 10
You may need to customize your ApplicationViewTitleBar in your Universal...
With Windows 8.1 appeared multitasking APIs allowing developers to use the Snap capabilities of Windows 8.0, expanded with Windows 8.1.
Since then, apps like Mail can open an embedded link by opening a second window. This multi windowing capability even made Apple jealous, and it is rumored to be available in iOS 9.
Developers can also open a second window of the same app! This is really interesting as it allows, for example, to open a mail in a second window while having a primary window with all your unread mails.
Apart from Microsoft apps, only a few apps are making use of those useful APIs, which is sad but understandable as the multi-windowing feature was designed primarily for tablets, which are definitely not selling like hotcakes.
With Windows 10, Microsoft introduced Tablet Mode (which I like to call Immersive Mode) and apps are in Fullscreen mode only when this mode is enabled. Otherwise, apps will launch in windows, just like it’s been the case before I was even born. Windows is about windows again, rejoice!
Interestingly, the APIs are the same whether you’re targetting Windows 8.1 or 10. The new version of Windows brings some new features, such as resizing your window.
Here’s the code.
First, you need to create a new CoreApplication view, so you have a new Dispatcher (new UI Thread) for that new view. Then, get the instance of the current window in that new view, set its Content (a Frame which navigates here to MainPage), and finally activate and show it by sending its Id to
As you can see in the code, I take the benefits of some new Windows 10 APIs:
Of course, using reflection you can use those in a W8.1 app running on a W10 machine.
Windows 10 apps can resize and have a minimum size
Windows 8.1 window size can’t be set by the developer, while the user has a very limited control over the window’s size
It also works on Windows 10 Mobile!
As usual, the samples are available here: https://github.com/TinaNigro/Sample3-MultiWindowing
Please note: I’m thinking of having just one repo with all the code samples inside, rather than having one repo per blogpost. Any opinion?