2016-10-20 7 views
2

私はアンドロイドとIOSプロジェクトを持つPortable xamarinフォーム(クロスプラットフォーム)を使ってアプリケーションを作っています。xamarinフォームのヘルプが必要デザイン

私は問題を設計しています。

以下は私のコードです。以下は

<Grid ColumnSpacing="0" RowSpacing="0" > 

    <Grid.RowDefinitions > 
     <RowDefinition Height="Auto"></RowDefinition> 
     <RowDefinition Height="Auto"></RowDefinition> 
     <RowDefinition Height="Auto"></RowDefinition> 
    </Grid.RowDefinitions> 
    <Grid.ColumnDefinitions> 
     <ColumnDefinition Width="*"></ColumnDefinition> 
    </Grid.ColumnDefinitions> 

    <StackLayout Grid.Row="0" Grid.Column="0" Padding="20,30,20,0"> 
     <StackLayout VerticalOptions="StartAndExpand" HorizontalOptions="FillAndExpand" HeightRequest="30" BackgroundColor="#6E335E" Padding="10,0,10,0" > 
     <Label Text="{ Binding CompanyName }" FontSize="18" HorizontalOptions="Start" VerticalOptions="CenterAndExpand" HorizontalTextAlignment="Center" TextColor="White" ></Label> 

     </StackLayout> 
    </StackLayout> 

    <StackLayout VerticalOptions="FillAndExpand" Grid.Row="1" HeightRequest="130" HorizontalOptions="FillAndExpand" Padding="20,0,20,0"> 
     <Image Source="{ Binding LogoPath }" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" Aspect="AspectFill"></Image> 

    </StackLayout> 

    <StackLayout Grid.Row="2" Grid.Column="0" Padding="10,0,10,30" VerticalOptions="StartAndExpand" HorizontalOptions="FillAndExpand" > 
     <Image Source="image_bottom.png" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" Aspect="AspectFill"></Image> 
    </StackLayout> 

    </Grid> 

私はデザイン

enter image description here

が問題を設計する上で私を助けてくださいする方法について説明した画像です。 anvance

おかげ

+2

私は2つの違いを見て、丸い角、2番目の画像に空白があります。実装しようとしている機能を指摘できますか? –

+0

メキシコの画像と紫色のバーの間のスペースを削除したい –

+0

コード内の要素の名前が間違っていることを明確にすることはできますか?それはimage_bottom.pngですか? {Binding LogoPath}で設定している要素ですか? –

答えて

0

はあなたのstacklayoutは130の高さを持っているので、行定義はその時点までに拡大しています。定義を*に、グリッドの垂直オプションをfillandexpandに設定して、残りのスペースを埋めるようにする必要があります。

<Grid.RowDefinitions > 
      <RowDefinition Height="Auto"></RowDefinition> 
      <RowDefinition Height="*"></RowDefinition> 
      <RowDefinition Height="Auto"></RowDefinition> 
</Grid.RowDefinitions>