From 28b4d60c801d52a2f99302ede54b9ebea476fbef Mon Sep 17 00:00:00 2001 From: Yan Maniez Date: Sat, 28 Sep 2019 03:57:39 +0200 Subject: [PATCH] Test FlyoutHeader dynamique par page --- .../AideDeJeu/Views/Library/ItemPage.xaml.cs | 13 ++--- AideDeJeu/AideDeJeu/Views/MainShell.xaml | 17 ++++++- AideDeJeu/AideDeJeu/Views/MainShell.xaml.cs | 50 ++++++++++++++++++- 3 files changed, 72 insertions(+), 8 deletions(-) diff --git a/AideDeJeu/AideDeJeu/Views/Library/ItemPage.xaml.cs b/AideDeJeu/AideDeJeu/Views/Library/ItemPage.xaml.cs index d2ab29fd..a74bb43d 100644 --- a/AideDeJeu/AideDeJeu/Views/Library/ItemPage.xaml.cs +++ b/AideDeJeu/AideDeJeu/Views/Library/ItemPage.xaml.cs @@ -55,13 +55,13 @@ namespace AideDeJeu.Views.Library //LoadPageAsync(); } - protected override void OnAppearing() - { - base.OnAppearing(); - LoadPageAsync(); - } + //protected override void OnAppearing() + //{ + // base.OnAppearing(); + // LoadPageAsync(); + //} - private string _Path { get; set; } = "index.md"; + private string _Path { get; set; } = null; //"index.md"; public string Path { get @@ -77,6 +77,7 @@ namespace AideDeJeu.Views.Library private async Task LoadPageAsync() { + if (Path == null) return; var regex = new Regex("/?(?.*?)(_with_(?.*))?\\.md(#(?.*))?"); var match = regex.Match(Uri.UnescapeDataString(Path)); var file = match.Groups["file"].Value; diff --git a/AideDeJeu/AideDeJeu/Views/MainShell.xaml b/AideDeJeu/AideDeJeu/Views/MainShell.xaml index 84486021..7ba06250 100644 --- a/AideDeJeu/AideDeJeu/Views/MainShell.xaml +++ b/AideDeJeu/AideDeJeu/Views/MainShell.xaml @@ -5,6 +5,9 @@ xmlns:pc="clr-namespace:AideDeJeu.Views.PlayerCharacter" xmlns:library="clr-namespace:AideDeJeu.Views.Library" x:Class="AideDeJeu.Views.MainShell"> + + @@ -16,7 +19,19 @@ - + + + + + + + index.md + + + + + +