Xamarin.fromsにて、以下のImageをStackLayoutの中に配置する際、画面の横幅にFitしつつ、画像の欠けなく表示させたいのですが、うまくいかず画像が欠けてしまいます。
![]
実現する方法はありませんでしょうか?
今のコードは以下のようになってします。
Xaml
1<ContentPage 省略> 2 <Grid BackgroundColor="Gray"> 3 <StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="Transparent" Spacing="0"> 4 <StackLayout Spacing="0" VerticalOptions="EndAndExpand" > 5 <Image Source="{Binding SampleImage}" Aspect="AspectFill"/> 6 <Image Source="{Binding SampleImage}" Aspect="AspectFill"/> 7 <Image Source="{Binding SampleImage}" Aspect="AspectFill"/> 8 </StackLayout> 9 </StackLayout> 10 </Grid> 11</ContentPage>
※横方向にFitさせたいですが、その際に画像の高さも保ちたいです。
回答2件
あなたの回答
tips
プレビュー