Tuesday, 18 November 2014

How to get the status bar visibility in a Windows Phone 8.1 XAML project

Here’s a quickie for you. Sometimes  you need to  know is the status bar visible or not. If you’ve found this blog post you have probably already found that the StatusBar class has no Visibility member. But it does have an OccludedRect, which is what we are going to exploit. Basically the idea is that an invisible status bar has no other size parameters than 0.

This is of course trivial, but still may prove useful for someone in a hurry.