You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VS2022调试Xamarin Forms UWP:无DebugSettings如何关闭帧率计数器

关闭Xamarin Forms UWP调试时的帧率计数器

你需要在UWP项目的代码中操作,共享项目里不存在DebugSettings属性,具体步骤如下:

  • 打开UWP项目下的App.xaml.cs文件
  • 在App类的构造函数或者OnLaunched方法中,添加代码:
    this.DebugSettings.EnableFrameRateCounter = false;
    
    如果在其他方法中调用,也可以通过Application实例获取:
    Application.Current.DebugSettings.EnableFrameRateCounter = false;
    
  • 若仍提示找不到DebugSettings,检查文件顶部是否引入了Windows.UI.Xaml命名空间(UWP项目的App.xaml.cs默认已包含,一般无需额外添加)

内容的提问来源于stack exchange,提问作者LairdPleng

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.04 07:55:18