From 7d840a486d25af82ce44121e81d0b027c6ba985c Mon Sep 17 00:00:00 2001 From: "maxime.BATISTA@etu.uca.fr" Date: Thu, 20 Apr 2023 15:22:51 +0200 Subject: [PATCH] add MyRecipes page --- ShoopNCook.csproj | 3 +++ Views/MyRecipesPage.xaml | 24 ++++++++++++++++++++++++ Views/OwnedRecipeView.xaml | 6 ++++++ Views/OwnedRecipeView.xaml.cs | 14 ++++++++++++++ Views/RecipeView.xaml.cs | 1 - 5 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 Views/OwnedRecipeView.xaml create mode 100644 Views/OwnedRecipeView.xaml.cs diff --git a/ShoopNCook.csproj b/ShoopNCook.csproj index 56b5262..0974f50 100644 --- a/ShoopNCook.csproj +++ b/ShoopNCook.csproj @@ -77,6 +77,9 @@ MSBuild:Compile + + MSBuild:Compile + MSBuild:Compile diff --git a/Views/MyRecipesPage.xaml b/Views/MyRecipesPage.xaml index 09e1b98..e59de70 100644 --- a/Views/MyRecipesPage.xaml +++ b/Views/MyRecipesPage.xaml @@ -3,6 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="ShoopNCook.Views.MyRecipesPage" Title="MyRecipesPage" + xmlns:views="clr-namespace:ShoopNCook.Views" BackgroundColor="{StaticResource BackgroundPrimary}"> @@ -28,5 +29,28 @@ HorizontalOptions="Center" VerticalOptions="Center"/> + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Views/OwnedRecipeView.xaml b/Views/OwnedRecipeView.xaml new file mode 100644 index 0000000..adcf9e6 --- /dev/null +++ b/Views/OwnedRecipeView.xaml @@ -0,0 +1,6 @@ + + + + diff --git a/Views/OwnedRecipeView.xaml.cs b/Views/OwnedRecipeView.xaml.cs new file mode 100644 index 0000000..9f8f54f --- /dev/null +++ b/Views/OwnedRecipeView.xaml.cs @@ -0,0 +1,14 @@ +namespace ShoopNCook.Views; + +public partial class OwnedRecipeView : ContentView +{ + + private readonly RecipeView recipeView; + + public OwnedRecipeView(float note, string title, string subtitle) + { + recipeView = new RecipeView(note, title, subtitle); + InitializeComponent(); + } + +} \ No newline at end of file diff --git a/Views/RecipeView.xaml.cs b/Views/RecipeView.xaml.cs index 8dcd0ea..5051268 100644 --- a/Views/RecipeView.xaml.cs +++ b/Views/RecipeView.xaml.cs @@ -3,7 +3,6 @@ namespace ShoopNCook.Views; public partial class RecipeView : ContentView { - public RecipeView(): this(5, "Title", "Subtitle") {}