2017-08-14 48 views
0

這裏是我創建的XAML代碼:我如何分配更多的空間爲數字

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

當我運行的代碼窗口中的數據輸入面積僅寬足以顯示一個數字。有沒有一種方法可以擴展它,這樣可以讓我輸入三位數字?

回答

2

設置一個WidthRequest值,也嘗試改變Horizo​​ntalOptions

<Entry Keyboard="Numeric" VerticalOptions="Center" WidthRequest="100" HorizontalOptions="FillAndExpand" />