From 52ffc2a2916dbffe30238ff31389e156bffa082c Mon Sep 17 00:00:00 2001 From: Omid Mafakher Date: Thu, 8 May 2025 15:11:54 +0200 Subject: [PATCH 01/16] Update dependency Projektanker.Icons.Avalonia.FontAwesome to 8.4.0 (#86) Co-authored-by: Renovate Bot --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 739b949..08a996e 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -16,7 +16,7 @@ - + From 60bc11e1cffefae033d8f154ce1a73b079240f88 Mon Sep 17 00:00:00 2001 From: Omid Mafakher Date: Thu, 8 May 2025 15:14:03 +0200 Subject: [PATCH 02/16] Update dependency Projektanker.Icons.Avalonia to 8.4.0 (#85) Co-authored-by: Renovate Bot --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 08a996e..1bc85b4 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -15,7 +15,7 @@ - + From 386fc23951c146ff170a4205fe452ae06434e13e Mon Sep 17 00:00:00 2001 From: Omid Mafakher Date: Thu, 8 May 2025 15:29:46 +0200 Subject: [PATCH 03/16] Update dependency Projektanker.Icons.Avalonia to v9 (#95) Co-authored-by: Renovate Bot --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 1bc85b4..3bbe183 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -15,7 +15,7 @@ - + From e550a310e57f4dcf9488957cb4527f97999563dd Mon Sep 17 00:00:00 2001 From: Omid Mafakher Date: Thu, 8 May 2025 15:31:35 +0200 Subject: [PATCH 04/16] Update dependency Projektanker.Icons.Avalonia.FontAwesome to v9 (#96) Co-authored-by: Renovate Bot --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 3bbe183..2973839 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -16,7 +16,7 @@ - + From c58050608ee767210fd13f81f58ce59a766158b7 Mon Sep 17 00:00:00 2001 From: Omid Mafakher Date: Tue, 3 Jun 2025 23:27:49 +0200 Subject: [PATCH 05/16] fix issue of crash when host navigate back (#100) * #98 fix issue of crash when host navigate back * Update src/AvaloniaInside.Shell/StackContentView.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/AvaloniaInside.Shell/StackContentView.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/AvaloniaInside.Shell/StackContentView.cs b/src/AvaloniaInside.Shell/StackContentView.cs index 98ffb74..91dd1a6 100644 --- a/src/AvaloniaInside.Shell/StackContentView.cs +++ b/src/AvaloniaInside.Shell/StackContentView.cs @@ -60,8 +60,17 @@ public async Task PushViewAsync(object view, // Bring to front if exists in collection if (Children.Contains(control)) - Children.Remove(control); - Children.Add(control); + { + var currentIndex = Children.IndexOf(control); + if (currentIndex != Children.Count - 1) + { + Children.Move(currentIndex, Children.Count - 1); + } + } + else + { + Children.Add(control); + } await OnContentUpdateAsync(control, cancellationToken); await UpdateCurrentViewAsync(current, control, navigateType, false, cancellationToken); From 8d2ccec96a64162942e9b34d83853ec5a19a165d Mon Sep 17 00:00:00 2001 From: Omid Mafakher Date: Wed, 4 Jun 2025 11:36:12 +0200 Subject: [PATCH 06/16] Update dependency ReactiveUI to 20.3.1 (#99) Co-authored-by: Renovate Bot --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 2973839..a819848 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -18,6 +18,6 @@ - + From 75e4f92e3ba6850f691c17ea2eaa6b92db17251c Mon Sep 17 00:00:00 2001 From: Omid Mafakher Date: Fri, 6 Jun 2025 17:13:18 +0200 Subject: [PATCH 07/16] Update avalonia monorepo to 11.3.1 (#101) * Update avalonia monorepo to 11.3.1 * Update src/Directory.Packages.props Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/Directory.Packages.props Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Renovate Bot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/Directory.Packages.props | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index a819848..8a7f7e6 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -4,16 +4,15 @@ true - - - - - - - - - - + + + + + + + + + From 519a437c2ce419fbbb1469a30c736e90efc49ef9 Mon Sep 17 00:00:00 2001 From: Omid Mafakher Date: Wed, 11 Jun 2025 17:34:24 +0200 Subject: [PATCH 08/16] Update dependency Xamarin.AndroidX.Core.SplashScreen to 1.0.1.16 (#102) Co-authored-by: Renovate Bot --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 8a7f7e6..4c304c6 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -16,7 +16,7 @@ - + From f75ddbf334d59b9c4e6503dba57d8faf2adea2bb Mon Sep 17 00:00:00 2001 From: Omid Mafakher Date: Thu, 26 Jun 2025 19:30:09 +0200 Subject: [PATCH 09/16] Update avalonia monorepo to 11.3.2 (#103) Co-authored-by: Renovate Bot --- src/Directory.Packages.props | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 4c304c6..8473523 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -4,15 +4,15 @@ true - - - - - - - - - + + + + + + + + + From 871974e5f34123361a820efe327e62a2f9e8dda7 Mon Sep 17 00:00:00 2001 From: Omid Mafakher Date: Tue, 1 Jul 2025 19:51:20 +0200 Subject: [PATCH 10/16] Update dependency ReactiveUI to 20.4.1 (#104) Co-authored-by: Renovate Bot --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 8473523..bf8ee44 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -17,6 +17,6 @@ - + From 8bdacfe78df7e232a1871f516d2e8146754add26 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 2 Jul 2025 20:31:58 +0200 Subject: [PATCH 11/16] Synchronize window title with navigation bar header (#105) * Initial plan * Implement window title synchronization with navigation bar header Co-authored-by: OmidID <956077+OmidID@users.noreply.github.com> * Clean up implementation and restore original target frameworks Co-authored-by: OmidID <956077+OmidID@users.noreply.github.com> * Implement OnNavigate event and revert primary constructor changes Co-authored-by: OmidID <956077+OmidID@users.noreply.github.com> * Restore original target frameworks Co-authored-by: OmidID <956077+OmidID@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: OmidID <956077+OmidID@users.noreply.github.com> --- src/AvaloniaInside.Shell/INavigator.cs | 2 ++ src/AvaloniaInside.Shell/Navigator.cs | 16 ++++++++++ .../ShellExample/Views/MainWindow.axaml | 2 +- .../ShellExample/Views/MainWindow.axaml.cs | 32 +++++++++++++++++++ 4 files changed, 51 insertions(+), 1 deletion(-) diff --git a/src/AvaloniaInside.Shell/INavigator.cs b/src/AvaloniaInside.Shell/INavigator.cs index 18d03a5..d8f4e90 100644 --- a/src/AvaloniaInside.Shell/INavigator.cs +++ b/src/AvaloniaInside.Shell/INavigator.cs @@ -9,6 +9,8 @@ public interface INavigator { Uri CurrentUri { get; } + event EventHandler? OnNavigate; + INavigationRegistrar Registrar { get; } NavigationChain? CurrentChain { get; } diff --git a/src/AvaloniaInside.Shell/Navigator.cs b/src/AvaloniaInside.Shell/Navigator.cs index d189083..f993d24 100644 --- a/src/AvaloniaInside.Shell/Navigator.cs +++ b/src/AvaloniaInside.Shell/Navigator.cs @@ -18,6 +18,8 @@ public partial class Navigator : INavigator private bool _navigating; private ShellView? _shellView; + public event EventHandler? OnNavigate; + public ShellView ShellView => _shellView ?? throw new ArgumentNullException(nameof(ShellView)); public Uri CurrentUri => _stack.Current?.Uri ?? Registrar.RootUri; @@ -154,6 +156,20 @@ await _updateStrategy.UpdateChangesAsync( await fromPage.OnNavigateAsync(args, cancellationToken); } + // Fire the OnNavigate event for external subscribers + OnNavigate?.Invoke(this, new NaviagateEventArgs + { + Sender = sender, + From = fromPage, + To = _stack.Current?.Instance, + FromUri = origin, + ToUri = newUri, + Argument = argument, + Navigate = finalNavigateType, + WithAnimation = withAnimation, + OverrideTransition = overrideTransition + }); + _navigating = false; } diff --git a/src/Example/ShellExample/ShellExample/Views/MainWindow.axaml b/src/Example/ShellExample/ShellExample/Views/MainWindow.axaml index 70ee737..34e2a51 100644 --- a/src/Example/ShellExample/ShellExample/Views/MainWindow.axaml +++ b/src/Example/ShellExample/ShellExample/Views/MainWindow.axaml @@ -8,5 +8,5 @@ Icon="/Assets/avalonia-logo.ico" Title="ShellExample" Width="450"> - + diff --git a/src/Example/ShellExample/ShellExample/Views/MainWindow.axaml.cs b/src/Example/ShellExample/ShellExample/Views/MainWindow.axaml.cs index f9a4814..06958c6 100644 --- a/src/Example/ShellExample/ShellExample/Views/MainWindow.axaml.cs +++ b/src/Example/ShellExample/ShellExample/Views/MainWindow.axaml.cs @@ -1,5 +1,7 @@ using Avalonia; using Avalonia.Controls; +using Avalonia.Interactivity; +using AvaloniaInside.Shell; namespace ShellExample.Views; @@ -11,4 +13,34 @@ public MainWindow() InitializeComponent(); } + protected override void OnLoaded(RoutedEventArgs e) + { + base.OnLoaded(e); + + // Subscribe to navigation events to update window title + if (MainView.Navigator != null) + { + MainView.Navigator.OnNavigate += OnNavigate; + } + } + + protected override void OnUnloaded(RoutedEventArgs e) + { + // Unsubscribe from navigation events + if (MainView.Navigator != null) + { + MainView.Navigator.OnNavigate -= OnNavigate; + } + + base.OnUnloaded(e); + } + + private void OnNavigate(object? sender, NaviagateEventArgs e) + { + if (e.To is AvaloniaObject targetView) + { + var header = NavigationBar.GetHeader(targetView) as string; + Title = header ?? "Shell Example"; + } + } } From 6d09690799e3c4f115dbffc188918bbc4bada9b8 Mon Sep 17 00:00:00 2001 From: Omid Mafakher Date: Mon, 18 Aug 2025 22:55:18 +0200 Subject: [PATCH 12/16] Update avalonia monorepo to 11.3.4 (#108) Co-authored-by: Renovate Bot --- src/Directory.Packages.props | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index bf8ee44..17d806c 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -4,15 +4,15 @@ true - - - - - - - - - + + + + + + + + + From 315f22478af1fddd63abc0d6217b379ccada95cb Mon Sep 17 00:00:00 2001 From: Omid Mafakher Date: Mon, 18 Aug 2025 22:55:30 +0200 Subject: [PATCH 13/16] Update dependency Xamarin.AndroidX.Core.SplashScreen to 1.0.1.17 (#109) Co-authored-by: Renovate Bot --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 17d806c..0c49db0 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -16,7 +16,7 @@ - + From f4260eb6543b1650b62b1a84f746e6c09a76fd02 Mon Sep 17 00:00:00 2001 From: Omid Mafakher Date: Wed, 3 Sep 2025 20:52:08 +0200 Subject: [PATCH 14/16] Update dependency ReactiveUI to v21 (#110) Co-authored-by: Renovate Bot --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 0c49db0..5b14dad 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -17,6 +17,6 @@ - + From 97ba84bfee22f75c888765d1a9db1a898f05a118 Mon Sep 17 00:00:00 2001 From: Omid Mafakher Date: Wed, 3 Sep 2025 20:52:59 +0200 Subject: [PATCH 15/16] Update avalonia monorepo to 11.3.5 (#111) Co-authored-by: Renovate Bot --- src/Directory.Packages.props | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 5b14dad..3881585 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -4,15 +4,15 @@ true - - - - - - - - - + + + + + + + + + From 9bf7c67668221a2e3b8ea6dd5ef170f313c0ffe3 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Sep 2025 21:06:05 +0200 Subject: [PATCH 16/16] Release version 1.3.2.2 - Update package version in csproj and README (#112) * Initial plan * Update version to 1.3.2.2 in csproj and README Co-authored-by: OmidID <956077+OmidID@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: OmidID <956077+OmidID@users.noreply.github.com> --- README.md | 2 +- src/AvaloniaInside.Shell/AvaloniaInside.Shell.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c94b959..ce2cf7e 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ We welcome feedback, suggestions, and contributions from anyone who is intereste To use AvaloniaInside.Shell in your Avalonia project, you can install the package via NuGet using the following command in the Package Manager Console: ```bash -dotnet add package AvaloniaInside.Shell --version 1.3.2 +dotnet add package AvaloniaInside.Shell --version 1.3.2.2 ``` Alternatively, you can also install the package through Visual Studio's NuGet Package Manager. diff --git a/src/AvaloniaInside.Shell/AvaloniaInside.Shell.csproj b/src/AvaloniaInside.Shell/AvaloniaInside.Shell.csproj index ada87c5..35dcff5 100644 --- a/src/AvaloniaInside.Shell/AvaloniaInside.Shell.csproj +++ b/src/AvaloniaInside.Shell/AvaloniaInside.Shell.csproj @@ -3,7 +3,7 @@ net8.0;net9.0 enable latest - 1.3.2 + 1.3.2.2 Shell view for Avalonia Shell reduces the complexity of mobile/desktop application development by providing the fundamental features that most applications require AvaloniaInside