If you are a developer building apps for Universal Windows Platform, you might have noticed that, at the time of debugging there are some strings of digit getting display just under the title bar of the application. This is called as Frame Rate Counter, which displays frame rate and per frame CPU usage.

 

Today in this small blog post, we will learn how to enable/disable the Frame Rate Counter in your Universal Windows apps. Countinue reading to know more about it.

 

How to turn ON/OFF the Frame Rate Counter in apps for Universal Windows Platform? (www.kunal-chowdhury.com)

 

Frame Rate Counter is a set of few numerics that gets displayed just under the title bar, when the app runs in debug mode. But when this runs in “Release Mode”, you will find that, it’s not visible in the screen. This is default behaviour of the app template that you are executing. Hence you can be assured that, it will not display when some one installs the app from store and runs it; unless you specifically asked it to display all the time.

 

Frame Rate Counter in Windows 10 Universal App (www.kunal-chowdhury.com)

 

The code that enables the Frame Rate Counter in debug mode is generally found in the App.xaml.cs class file. Open the same file and navigate to the OnLaunched event. There you will find the following code: this.DebugSettings.EnableFrameRateCounter set as “true”, when the debugger is attached.

 

If you want to remove the counter getting displayed in the app while running, you can set that property to “false”. More precisely, you can delete the entire code block (marked in rectangular, below) to remove it entirely.

 

Code for Frame Rate Counter visibility in Windows 10 Universal App (www.kunal-chowdhury.com)

 

In case it is require in any place based on conditions, you can set the property to either true or false. Make sure to always check the debugger before calling this property. This way you will be assured that, it will not execute to user’s system when run from the store.

 

I hope that the post was helpful to give you some idea about the Frame Rate Counter and how to make it enable/disable. Don’t just stop here. Read my last post to know How to apply custom color in #UWP apps Title Bar?

 

Subscribe to my blog’s RSS feed and email newsletter to get all the post updates directly deliver to your inbox. I am available on Twitter, Facebook and Google+. Do connect with me to get all the updates that I share over those social networking channels. Happy coding!!!

 

Have a question? Or, a comment? Let's Discuss it below...

Thank you for visiting our website!

We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.

We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.