Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Images in carouselview are resized when I change the orientation of the device to horizontal

$
0
0

when i change the orientation some section of the image is not visible

I'll show the code i'm using

<Grid RowSpacing="0">
  <Grid.RowDefinitions>
    <RowDefinition Height=".3*"/>
    <RowDefinition Height=".7*"/>
  </Grid.RowDefinitions>
  <cv:CarouselView ItemsSource="{Binding Zoos}" x:Name="CarouselZoos">
    <cv:CarouselView.ItemTemplate>
      <DataTemplate>
        <Grid>
          <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
          </Grid.RowDefinitions>
          <Image Grid.RowSpan="2" Aspect="AspectFill" Source="{Binding ImageUrl}"/>
          <StackLayout Grid.Row="1" BackgroundColor="#80000000" Padding="12">
            <Label TextColor="White" Text="{Binding Name}" FontSize="16" HorizontalOptions="Center" VerticalOptions="CenterAndExpand"/>
          </StackLayout>
        </Grid>
      </DataTemplate>
    </cv:CarouselView.ItemTemplate>
  </cv:CarouselView>
</Grid>

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>