From 844a0a1c4e146f70469dbc0654c053ab34d64fc1 Mon Sep 17 00:00:00 2001 From: Yan Maniez Date: Sat, 31 Aug 2019 00:30:14 +0200 Subject: [PATCH] Tests --- .../AideDeJeu/Views/Library/ItemPage.xaml.cs | 28 ++++++---- AideDeJeu/AideDeJeu/Views/MainShell.xaml | 51 ++++++++++++++----- AideDeJeu/AideDeJeu/Views/MainShell.xaml.cs | 15 +++++- 3 files changed, 69 insertions(+), 25 deletions(-) diff --git a/AideDeJeu/AideDeJeu/Views/Library/ItemPage.xaml.cs b/AideDeJeu/AideDeJeu/Views/Library/ItemPage.xaml.cs index 8c640f73..cf436f3f 100644 --- a/AideDeJeu/AideDeJeu/Views/Library/ItemPage.xaml.cs +++ b/AideDeJeu/AideDeJeu/Views/Library/ItemPage.xaml.cs @@ -13,7 +13,8 @@ using Xamarin.Forms.Xaml; namespace AideDeJeu.Views.Library { [XamlCompilation(XamlCompilationOptions.Compile)] - public partial class ItemPage : ContentPage + [QueryProperty("Path", "path")] + public partial class ItemPage : ContentPage { public MainViewModel Main { @@ -28,19 +29,26 @@ namespace AideDeJeu.Views.Library public ItemPage() { InitializeComponent(); + } - BindingContext = this.viewModel = new ItemDetailViewModel(new Item() - { - Name = "Bibliothèque", - Id = "index.md", - Markdown = AideDeJeu.Tools.Helpers.GetResourceString($"AideDeJeu.Data.index.md"), - } - ) { Title = "Bibliothèque" }; - + protected override void OnAppearing() + { + base.OnAppearing(); LoadPageAsync(); } - public string Path { get; set; } = "l5r_index_hd.md"; + private string _Path { get; set; } = "index.md"; + public string Path + { + get + { + return _Path; + } + set + { + _Path = value; + } + } private async Task LoadPageAsync() { diff --git a/AideDeJeu/AideDeJeu/Views/MainShell.xaml b/AideDeJeu/AideDeJeu/Views/MainShell.xaml index 32957450..91e91775 100644 --- a/AideDeJeu/AideDeJeu/Views/MainShell.xaml +++ b/AideDeJeu/AideDeJeu/Views/MainShell.xaml @@ -15,24 +15,47 @@ - - - - - - - - - - - - - - + + + + +