我需要使Entry和Picker字段水平填充屏幕。
我尝试过任何可能的HorizontalOptions但没有成功。
我的代码如下;
<StackLayout Orientation="Horizontal" HorizontalOptions="FillAndExpand">
<StackLayout Orientation="Vertical">
<Entry x:Name="ReceiverIBANTextField" Placeholder="Alıcı IBAN" Keyboard="Numeric"> </Entry>
<Entry x:Name="ReceiverFullNameTextField" Placeholder="Alıcı Ad Soyad" > </Entry>
<StackLayout Orientation="Horizontal">
<Entry x:Name="EntryTransferAmount" Placeholder="Tutar Giriniz" Keyboard="Numeric" VerticalOptions="FillAndExpand"/>
<Label x:Name="LabelCurrencyName" Text="$" />
</StackLayout>
<StackLayout Orientation="Horizontal">
<StackLayout HorizontalOptions="FillAndExpand">
<Label TextColor="#0099DC">Tümünü Aktar </Label>
</StackLayout>
<StackLayout HorizontalOptions="Fill" >
<Switch x:Name="SwitchForAllInForVirman" Toggled="SwitchForAllIn_Toggled" HorizontalOptions="End"/>
</StackLayout>
</StackLayout>
<StackLayout Orientation="Vertical" HorizontalOptions="FillAndExpand" >
<Entry x:Name="EntryDescriptionForVirman" Placeholder="Açıklama Giriniz"></Entry>
<Picker x:Name="PickerPaymentType" Title="Ödeme Tipi" ></Picker>
<Entry x:Name="QuickTransactionNameTextField" Placeholder="Hızlı İşlem Adı"></Entry>
</StackLayout>
</StackLayout>
</StackLayout>
答案 0 :(得分:1)
我在示例项目中尝试了您的代码,您还需要将第二个StackLayout的HorizontalOptions
设置为FillAndExpand
才能生效。