diff --git a/src/UnoFileDownloader/UnoFileDownloader/UnoFileDownloader/App.cs b/src/UnoFileDownloader/UnoFileDownloader/UnoFileDownloader/App.cs index ffdf41b..9a91e8f 100644 --- a/src/UnoFileDownloader/UnoFileDownloader/UnoFileDownloader/App.cs +++ b/src/UnoFileDownloader/UnoFileDownloader/UnoFileDownloader/App.cs @@ -58,7 +58,7 @@ protected async override void OnLaunched(LaunchActivatedEventArgs args) //.AddJsonTypeInfo(WeatherForecastContext.Default.IImmutableListWeatherForecast) ) .UseHttp((context, services) => services - // Register HttpClient + // Register HttpClient #if DEBUG // DelegatingHandler will be automatically injected into Refit Client .AddTransient() @@ -74,17 +74,18 @@ protected async override void OnLaunched(LaunchActivatedEventArgs args) MainWindow = builder.Window; #if DEBUG - MainWindow.EnableHotReload(); + MainWindow.EnableHotReload(); #endif - Host = await builder.NavigateAsync(); + Host = await builder.NavigateAsync(); } private static void RegisterRoutes(IViewRegistry views, IRouteRegistry routes) { views.Register( - new ViewMap(ViewModel: typeof(ShellModel)), + new ViewMap(ViewModel: typeof(ShellModel), View: typeof(Shell)), new ViewMap(), + new ViewMap(), new DataViewMap() ); @@ -94,6 +95,7 @@ private static void RegisterRoutes(IViewRegistry views, IRouteRegistry routes) { new RouteMap("Main", View: views.FindByViewModel()), new RouteMap("Second", View: views.FindByViewModel()), + new RouteMap("About", View: views.FindByViewModel()), } ) ); diff --git a/src/UnoFileDownloader/UnoFileDownloader/UnoFileDownloader/Presentation/AboutModel.cs b/src/UnoFileDownloader/UnoFileDownloader/UnoFileDownloader/Presentation/AboutModel.cs index a5083fb..1b438a8 100644 --- a/src/UnoFileDownloader/UnoFileDownloader/UnoFileDownloader/Presentation/AboutModel.cs +++ b/src/UnoFileDownloader/UnoFileDownloader/UnoFileDownloader/Presentation/AboutModel.cs @@ -6,7 +6,11 @@ namespace UnoFileDownloader.Presentation { - public partial record AboutModel + public partial record AboutModel(INavigator Navigator) { + public void CloseAbout() + { + _ = Navigator.NavigateBackAsync(this); + } } } diff --git a/src/UnoFileDownloader/UnoFileDownloader/UnoFileDownloader/Presentation/AboutPage.xaml b/src/UnoFileDownloader/UnoFileDownloader/UnoFileDownloader/Presentation/AboutPage.xaml index d344e0a..49db7bd 100644 --- a/src/UnoFileDownloader/UnoFileDownloader/UnoFileDownloader/Presentation/AboutPage.xaml +++ b/src/UnoFileDownloader/UnoFileDownloader/UnoFileDownloader/Presentation/AboutPage.xaml @@ -6,9 +6,46 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" - Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> - - + Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" d:DataContext="{d:DesignInstance local:BindableAboutModel}"> + + + + + + + + + + + + + + + + + + + + +