###前提・実現したいこと
この画像のように、Xamarin.FormsでGridを使用してImageともう一つ何かのViewを縦に並べて余白なく表示したい
###発生している問題・エラーメッセージ
画像の通り、RowDefinitionのHeightをAutoに設定しても、Grid部分になぜか余白ができてしまいます。
何かプロパティの設定を間違えていますでしょうか。
![
###該当のソースコード
詳細はGitHubをご覧ください
<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms" prism:ViewModelLocator.AutowireViewModel="True" x:Class="GridImageTest.Views.MainPage" Title="MainPage"> <Grid HorizontalOptions="FillAndExpand" VerticalOptions="Start" BackgroundColor="Red" RowSpacing="0" > <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Image Source="sample_image.png" Grid.Row="0" /> <Label Grid.Row="1" Text="test message" BackgroundColor="Blue" /> </Grid> </ContentPage>
###試したこと
ちなみに、Gridの部分をStackLayoutに変更するとこの現象は発生しませんでした。
暫定的にStackLayoutで対応していますが気になったので質問を上げさせていただきました。
###補足情報(言語/FW/ツール等のバージョンなど)
ビルド環境:Visual Studio 2015
OS:Windows 10
実行環境:Android 7.1.1
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。