0

这是我创建的 XAML 代码:

<ViewCell>
   <Grid VerticalOptions="CenterAndExpand" Padding="20, 0">
      <Label HorizontalOptions="StartAndExpand" Text="ABC" />
      <Entry Keyboard="Numeric" VerticalOptions="Center" HorizontalOptions="End" />
   </Grid>
</ViewCell>

当我运行代码时,窗口的数据输入区域仅宽到显示一位数字。有没有办法可以扩展它,这样我就可以输入三位数?

4

1 回答 1

2

设置一个 WidthRequest 值,并尝试更改 Horizo​​ntalOptions

<Entry Keyboard="Numeric" VerticalOptions="Center" WidthRequest="100" HorizontalOptions="FillAndExpand" />
于 2017-08-15T00:43:10.943 回答