You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ShopNCook/Views/Components/RecipeView.xaml

73 lines
2.7 KiB

<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShoopNCook.Views.RecipeView"
Margin="4,2">
<Border
Style="{StaticResource SecondaryBorderShadow}"
StrokeShape="RoundRectangle 30">
<Grid
BackgroundColor="{StaticResource BackgroundSecondary}"
Padding="10"
MinimumHeightRequest="175"
MaximumHeightRequest="175"
MinimumWidthRequest="150"
MaximumWidthRequest="150"
RowDefinitions="*, Auto">
<Grid.GestureRecognizers>
<TapGestureRecognizer Tapped="OnRecipeTapped"/>
</Grid.GestureRecognizers>
<Border
Grid.Row="0"
Stroke="Transparent"
StrokeShape="RoundRectangle 20"
BackgroundColor="{StaticResource ImageBackground}">
<Grid>
<Image
Source="{Binding Image}"
Aspect="AspectFill"
MinimumHeightRequest="155"
MinimumWidthRequest="130"
MaximumHeightRequest="155"
MaximumWidthRequest="130"/>
<HorizontalStackLayout
VerticalOptions="End"
x:Name="Stars"
HorizontalOptions="End"
Margin="0, 0, 15, 2">
<Image
WidthRequest="10"
Source="star_full.svg"/>
<Image
WidthRequest="10"
Source="star_full.svg"/>
<Image
WidthRequest="10"
Source="star_full.svg"/>
<Image
WidthRequest="10"
Source="star_full.svg"/>
<Image
WidthRequest="10"
Source="star_full.svg"/>
</HorizontalStackLayout>
</Grid>
</Border>
<VerticalStackLayout Grid.Row="1">
<Label
TextColor="{StaticResource TextColorPrimary}"
Text="{Binding Name}"/>
<Label
TextColor="{StaticResource TextColorSecondary}"
Text="{Binding CookTimeMins, StringFormat='{0} mins'}"/>
</VerticalStackLayout>
</Grid>
</Border>
</ContentView>