Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ricardoprestes
Created February 5, 2020 15:20
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 ricardoprestes/f9b8579dc2f3f8a9ba51c6ca6ddeb978 to your computer and use it in GitHub Desktop.
Save ricardoprestes/f9b8579dc2f3f8a9ba51c6ca6ddeb978 to your computer and use it in GitHub Desktop.
<Label
Text="Cartões de Crédito"
TextColor="Gray"
/>
<CollectionView
ItemsSource="{Binding CreditCards}"
ItemsLayout="HorizontalList"
HeightRequest="190">
<CollectionView.ItemTemplate>
<DataTemplate>
<StackLayout
Padding="5">
<material:MaterialCard
CornerRadius="10"
WidthRequest="240"
Elevation="2"
Padding="10"
BackgroundColor="{Binding CardColor}">
<StackLayout>
<Label
Grid.Row="0"
FontAttributes="Bold"
TextColor="{Binding TextColor}"
Text="{Binding Name}"
FontSize="Small"/>
<Label
Grid.Row="1"
FontSize="Large"
HorizontalTextAlignment="End"
VerticalTextAlignment="Center"
FontAttributes="Bold"
TextColor="{Binding TextColor}"
Text="{Binding BillValue, StringFormat='{0:R$ ###,###,##0.00}'}"/>
<Label
Grid.Row="2"
HorizontalTextAlignment="End"
VerticalTextAlignment="Center"
FontSize="Small"
TextColor="{Binding TextColor}"
Text="{Binding Expiration, StringFormat='Vence em: {0:dd/MMM}'}"/>
<Label
Grid.Row="3"
HorizontalTextAlignment="Center"
TextColor="{Binding TextColor}"
Text="{Binding Number}"/>
<BoxView
Grid.Row="4"
Margin="-10,0"
BackgroundColor="Black"/>
</StackLayout>
</material:MaterialCard>
</StackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment