How to turn off the WP7 performance glyphs in your emulator
Tuesday, October 05, 2010 9:52 PM
Do you see those funky characters on the right side of your WP7 emulator? Wonder what they are? Wonder how to get rid of them? Then I have just the blog for you to read!
Ok, so you've been doing some WP7 dev, COOL! But when you run the emulator, you see some funky characters on the far right hand side of the emulator, what the heck are they? Need to get rid of them cause you want to take a live screen cap of your WONDERFUL app for publishing on the Marketplace? COOL!
Quick answer, they're performance counters and are there mostly for game developers. I mean, really, when was the last time you needed to know the FPS (frames per second) refresh rate for your Twitter app? Ya, didn't think so. To remove it, you need to edit the App.xaml.cs file.
Like I said, quick. Longer? Sure. LOL If you're reading my blog, chances are pretty good, you're not here for my XNA experience (but I do hope you're here for my Visual Studio and WP7 experience? LOL).
Anyways, if you're curious to see them a bit clearer, before you learn how to get rid of them, check this out. Resize your emulator. Simple eh? LOL
Jeff Wilcox has a really cool blog which talks about what the specific numbers mean, click on the picture for more details.
Ok, so now that you've satisfied your curiousity, how do you get rid of'em? Good question, simple! Either run your app with CTRL+F5 to run without a debugger, but then you'll be without your debugger. Or check out the App.xaml.cs file and look into the App() constructor. You'll see a line with EnableFrameRateCounter = true; I'm sure you can figure out the rest right? Right? RIGHT? It's a boolean value, I hope you can figure that part out?! LOL This is one of the few tricks I learned from Colin Melia at the WP7 Sat Ottawa at Algonquin College! Thanks Colin!
// Show graphics profiling information while debugging.
if( System.Diagnostics.Debugger.IsAttached )
// Display the current frame rate counters.
Application.Current.Host.Settings.EnableFrameRateCounter = false;
// Show the areas of the app that are being redrawn in each frame.
//Application.Current.Host.Settings.EnableRedrawRegions = true;
// Enable non-production analysis visualization mode,
// which shows areas of a page that are being GPU accelerated with a colored overlay.
//Application.Current.Host.Settings.EnableCacheVisualization = true;
Once you make that change then those funky characters will disappear. Hey, if you don't mind them, that's cool, but then of course taking LIVE screen caps for the Marketplace will, well, look a bit amateurish. So check it out.
Now that you know how to remove the performance glyphs, it's time to grab a coffee and get coding!
Jeff Wilcox: Frame rate counters in Windows Phone
PCHenry.com: WP7 Sat Ottawa at Algonquin College Summary
Colin Melia Blog