在Windows Phone 7的模拟器中运行应用程序时,默认会在右侧显示帧速率计数器的内容,这是用来监控应用程序的性能。如下图:

很多时候,这个帧速率是不需要的,但在模拟器里面无法配置,在程序代码里可以禁用或者启用。

文件 App.xaml.cs. 中找到该代码:

Application.Current.Host.Settings.EnableFrameRateCounter = true

将值赋为false,或者将整句话注销掉即可。

1 // Show graphics profiling information while debugging.
2 if (System.Diagnostics.Debugger.IsAttached)
3 {
4     // Display the current frame rate counters.
5     Application.Current.Host.Settings.EnableFrameRateCounter = false;
6 
7     // Other code…
8 }

msdn地址:http://msdn.microsoft.com/zh-cn/library/gg588380(v=vs.92)