我在笔记本电脑上创建了一个简单的应用程序,分辨率和文本大小为1440x900,app为100%(在设置中设置菜单屏幕)。当我在平板电脑上运行1920x1080分辨率和125%的应用程序时,网格显示不正确。 对:
错误:
如果我的平板电脑我在100%或175%的情况下更改字体大小,则网格会正确显示。
谢谢
编辑: 这是代码xaml:
<Grid x:Name="Grid">
<Grid.RowDefinitions>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#F2F2F2" BorderThickness="0,0.1,0,0.1">
<Line Stroke="#E9E9E9" X1="0" X2="400" Y1="30" Y2="30" StrokeThickness="1" StrokeDashArray="6" StrokeDashCap="Flat" />
</Border>
<Border Grid.Row="1" BorderBrush="#F2F2F2" BorderThickness="0,0.1,0,0.1">
<Line Stroke="#E9E9E9" X1="0" X2="400" Y1="30" Y2="30" StrokeThickness="1" StrokeDashArray="6" StrokeDashCap="Flat" />
</Border>
<Border Grid.Row="2" BorderBrush="#F2F2F2" BorderThickness="0,0.1,0,0.1">
<Line Stroke="#E9E9E9" X1="0" X2="400" Y1="30" Y2="30" StrokeThickness="1" StrokeDashArray="6" StrokeDashCap="Flat" />
</Border>
<Border Grid.Row="3" BorderBrush="#F2F2F2" BorderThickness="0,0.1,0,0.1">
<Line Stroke="#E9E9E9" X1="0" X2="400" Y1="30" Y2="30" StrokeThickness="1" StrokeDashArray="6" StrokeDashCap="Flat" />
</Border>
<Border Grid.Row="4" BorderBrush="#F2F2F2" BorderThickness="0,0.1,0,0.1">
<Line Stroke="#E9E9E9" X1="0" X2="400" Y1="30" Y2="30" StrokeThickness="1" StrokeDashArray="6" StrokeDashCap="Flat" />
</Border>
<Border Grid.Row="5" BorderBrush="#F2F2F2" BorderThickness="0,0.1,0,0.1">
<Line Stroke="#E9E9E9" X1="0" X2="400" Y1="30" Y2="30" StrokeThickness="1" StrokeDashArray="6" StrokeDashCap="Flat" />
</Border>
答案 0 :(得分:0)
我通过改变厚度大于0.4来解决它:
def params = ['a','b','c']
def foo(param) {
'foo-' + param
}
assert ['foo-a', 'foo-b', 'foo-c'] == params.collect { foo(it) }