ScrollViews on recipe

pull/29/head
Leo TUAILLON 2 years ago
parent 0a36e07cc3
commit 461f50d02d

@ -11,7 +11,7 @@
<TabBar>
<ShellContent
Title="Home"
ContentTemplate="{DataTemplate local:MainPage}"
ContentTemplate="{DataTemplate views:HomePage}"
Route="MainPage" />
<ShellContent

@ -71,6 +71,9 @@
</ItemGroup>
<ItemGroup>
<MauiXaml Update="Views\HomePage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\ProfilePage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShoopNCook.Views.HomePage"
Title="HomePage">
<ScrollView>
<Grid x:Name="RecipesGrid"
RowSpacing="10"
ColumnSpacing="10"
Padding="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- Recette 1 -->
<Frame Grid.Row="0" Grid.Column="0" Padding="0" Margin="5" CornerRadius="10" BackgroundColor="Aqua">
<Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Grid.Row="0" Source="facebook_logo.png" Aspect="AspectFill" Margin="0,0,0,10" />
<Label Grid.Row="1" Text="Titre Recette 1" FontAttributes="Bold" FontSize="Large" />
<Label Grid.Row="2" Text="Temps de préparation : 30 min" FontSize="Small" />
</Grid>
</Frame>
<!-- Recette 2 -->
<Frame Grid.Row="0" Grid.Column="1" Padding="0" Margin="5" CornerRadius="10" BackgroundColor="Aqua">
<Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Grid.Row="0" Source="facebook_logo.png" Aspect="AspectFill" Margin="0,0,0,10" />
<Label Grid.Row="1" Text="Titre Recette 2" FontAttributes="Bold" FontSize="Large" />
<Label Grid.Row="2" Text="Temps de préparation : 45 min" FontSize="Small" />
</Grid>
</Frame>
</Grid>
</ScrollView>
</ContentPage>

@ -0,0 +1,9 @@
namespace ShoopNCook.Views;
public partial class HomePage : ContentPage
{
public HomePage()
{
InitializeComponent();
}
}
Loading…
Cancel
Save