Skip to content

Instantly share code, notes, and snippets.

@BryanOroxon
Created December 30, 2019 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BryanOroxon/6f0c22eba1ce9144debb567d0e841770 to your computer and use it in GitHub Desktop.
Save BryanOroxon/6f0c22eba1ce9144debb567d0e841770 to your computer and use it in GitHub Desktop.
MoviesCarouse.xaml
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Class="GifInMotion.Views.MoviesCarousel"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewmodel="clr-namespace:GifInMotion.ViewModels"
Title="{Binding Title}"
BackgroundImageSource="space.png"
mc:Ignorable="d">
<ContentPage.Content>
<CarouselView x:Name="movieViewSource">
<CarouselView.ItemTemplate>
<DataTemplate>
<StackLayout
HorizontalOptions="Center"
VerticalOptions="Center">
<Label
Text="{Binding Title}"
FontAttributes="Bold"
TextColor="White"
FontSize="20" />
<Image
x:Name="GifXaml"
Source="{Binding Link}"
IsAnimationPlaying="True"
WidthRequest="250"
HeightRequest="200" />
<StackLayout Orientation="Horizontal">
<Label
Text="Episode "
FontAttributes="Bold"
FontSize="20"
TextColor="White" />
<Label
Text="{Binding Episode}"
FontAttributes="Bold"
FontSize="20"
TextColor="White" />
</StackLayout>
</StackLayout>
</DataTemplate>
</CarouselView.ItemTemplate>
</CarouselView>
</ContentPage.Content>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment