Discovering Windows Phone 7 #1

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 ( 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 –

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 ( 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


Categories: WP7

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s