-
Notifications
You must be signed in to change notification settings - Fork 15
Synchronize window title with navigation bar header #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: OmidID <956077+OmidID@users.noreply.github.com>
Co-authored-by: OmidID <956077+OmidID@users.noreply.github.com>
OmidID
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add OnNavigate event to INavigator. and use that event in ShellExample.
ignore ShellBottomCustomNavigator
Co-authored-by: OmidID <956077+OmidID@users.noreply.github.com>
Implemented OnNavigate event in INavigator interface and updated ShellExample to use it instead of property change listener. Event fires after successful navigation in Navigator.NotifyAsync(). Changes in commit 305d67c. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: OmidID <956077+OmidID@users.noreply.github.com>
* Update dependency Projektanker.Icons.Avalonia.FontAwesome to 8.4.0 (#86) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update dependency Projektanker.Icons.Avalonia to 8.4.0 (#85) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update dependency Projektanker.Icons.Avalonia to v9 (#95) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update dependency Projektanker.Icons.Avalonia.FontAwesome to v9 (#96) Co-authored-by: Renovate Bot <bot@renovateapp.com> * 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> * Update dependency ReactiveUI to 20.3.1 (#99) Co-authored-by: Renovate Bot <bot@renovateapp.com> * 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 <bot@renovateapp.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dependency Xamarin.AndroidX.Core.SplashScreen to 1.0.1.16 (#102) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update avalonia monorepo to 11.3.2 (#103) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update dependency ReactiveUI to 20.4.1 (#104) Co-authored-by: Renovate Bot <bot@renovateapp.com> * 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> * Update avalonia monorepo to 11.3.4 (#108) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update dependency Xamarin.AndroidX.Core.SplashScreen to 1.0.1.17 (#109) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update dependency ReactiveUI to v21 (#110) Co-authored-by: Renovate Bot <bot@renovateapp.com> * Update avalonia monorepo to 11.3.5 (#111) Co-authored-by: Renovate Bot <bot@renovateapp.com> * 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> --------- Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: OmidID <956077+OmidID@users.noreply.github.com>
This PR implements automatic synchronization of the window title with the navigation bar header, addressing the user request to have the window title reflect the current page's navigation bar content.
Changes Made
Core Implementation
x:Name="MainView"to enable code-behind access to the ShellViewOnLoaded()that:MainView.ContentView.PropertyChangedeventsStackContentView.CurrentViewPropertychanges (navigation occurs)NavigationBar.GetHeader(newValue) as stringTitleproperty with the header value or defaults to "Shell Example"Compatibility Fixes
How It Works
The implementation follows the approach suggested by @OmidID in the issue comments:
Example Behavior
NavigationBar.Header="Home") → Window title: "Home"NavigationBar.Header="Settings") → Window title: "Settings"NavigationBar.Header="Profile") → Window title: "Profile"The solution provides automatic synchronization without requiring manual title updates and includes proper null safety checks.
Fixes #97.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
av-build-tel-api-v1.avaloniaui.netdotnet exec --runtimeconfig /home/REDACTED/.nuget/packages/avalonia.buildservices/0.0.31/tools/netstandard2.0/runtimeconfig.json /home/REDACTED/.nuget/packages/avalonia.buildservices/0.0.31/tools/netstandard2.0/Avalonia.BuildServices.Collector.dll(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.