1.将图像绘制到屏幕边缘
考虑到电视安全区域,应用程序默认会将边框置于视口的边缘。我们建议关闭此功能并绘制到屏幕的边缘。 通过添加以下代码,可以在你的应用程序启动时绘制到屏幕的边缘:
switch (Windows.System.Profile.AnalyticsInfo.VersionInfo.DeviceFamily) { case "Windows.Desktop": break; case "Windows.Mobile": break; case "Windows.Tablet": break; case "Windows.SurfaceHub": break; case "Windows.Xbox": ApplicationView.GetForCurrentView().SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow); break; case "Windows.Iot": break; default: break; }
2.关闭鼠标模式
Xbox 用户喜欢其控制器。 若要优化控制器输入,禁用鼠标模式.
public App() { this.InitializeComponent(); this.RequiresPointerMode = Windows.UI.Xaml.ApplicationRequiresPointerMode.WhenRequested; this.Suspending += OnSuspending; }3.禁用缩放
bool result = Windows.UI.ViewManagement.ApplicationViewScaling.TrySetDisableLayoutScaling(true);