使用什么屏幕尺寸?

问题描述

所以,我正在用 C#、WPF 为平板电脑开发一个应用程序。我没有测试它,但客户告诉我屏幕是 10-17 英寸大。

我想知道要测试我的应用程序的屏幕尺寸。 我正在使用网格进行布局,但是当我说例如 GridRow1.height=2* GridRow2.height=3* 它在全屏和较小的窗口尺寸上看起来不一样。

解决方法

根据我的经验,屏幕分辨率对可用性的影响更大。

请参阅此处以获取解决方案:

TL;DR

<Window x:Class="YourApplication.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="YourApplication" 
    Height="{Binding SystemParameters.PrimaryScreenHeight}" 
    Width="{Binding SystemParameters.PrimaryScreenWidth}">