I’m starting to learn about XAN 4 for Windows Mobile 7, and going through all the examples from the MIX10.
The example I’m showing tonight comes from Shawn Hargreaves Blog (http://blogs.msdn.com/shawnhar/archive/2007/06/08/displaying-the-framerate.aspx) and It’s an example of how to create a Frame Rate counter component. I heard about this on this on the session CL19 (DEVELOPMENT AND DEBUGGING TOOLS FOR BUILDING XNA GAMES FOR WINDOWS PHONE – http://live.visitmix.com/MIX10/Sessions/CL19).
At first I had some problems with this specific line of code:
_font = Game.Content.Load<SpriteFont>(“Arial”);
The runtime was throwing a File Not Found exception.
I was initially adding the Arial.spritefont manually to the WindowsPhoneGame project, but digging the XNA Forums (http://forums.xna.com/forums/) I figured out that that resource needed to be added to the WindowsPhoneGameContent project instead of the Game project.
In the end, here it’s my FPS counter