From 468f66ab598ba81f6a6a4658bb4153410753ec18 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 6 Jun 2024 23:40:25 +0200 Subject: [PATCH] Implement a ToDo overview based on a JSON file --- Tasks/Lab12/TodoDetails/MainPage.xaml | 90 +++++++++++-------- Tasks/Lab12/TodoDetails/MainPage.xaml.cs | 7 +- Tasks/Lab12/TodoDetails/MauiProgram.cs | 5 ++ .../TodoDetails/Resources/Raw/tododata.json | 23 +++++ .../Lab12/TodoDetails/Services/TodoService.cs | 40 +++++++++ Tasks/Lab12/TodoDetails/TodoDetails.csproj | 5 ++ .../TodoDetails/ViewModel/BaseViewModel.cs | 21 +++++ .../TodoDetails/ViewModel/TodosViewModel.cs | 68 ++++++++++++++ 8 files changed, 219 insertions(+), 40 deletions(-) create mode 100644 Tasks/Lab12/TodoDetails/Resources/Raw/tododata.json create mode 100644 Tasks/Lab12/TodoDetails/Services/TodoService.cs create mode 100644 Tasks/Lab12/TodoDetails/ViewModel/BaseViewModel.cs create mode 100644 Tasks/Lab12/TodoDetails/ViewModel/TodosViewModel.cs diff --git a/Tasks/Lab12/TodoDetails/MainPage.xaml b/Tasks/Lab12/TodoDetails/MainPage.xaml index 960f19d..5a3d947 100644 --- a/Tasks/Lab12/TodoDetails/MainPage.xaml +++ b/Tasks/Lab12/TodoDetails/MainPage.xaml @@ -2,46 +2,62 @@ - - - - - - - - - - + xmlns:viewmodel="clr-namespace:TodoDetails.ViewModel" + x:DataType="viewmodel:TodosViewModel" + x:Class="TodoDetails.MainPage" + Title="{Binding Title}"> + + + + + + + + + + - - - - - + + + + + + + + + + + + + + - - +