-
Notifications
You must be signed in to change notification settings - Fork 778
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
Update Avalonia UI features #967
base: master
Are you sure you want to change the base?
Conversation
Added GoBack method in ShellViewModel.cs for back navigation using _navigationService. Updated NavigationSourceView.axaml and NavigationTargetView.axaml to replace placeholder text with structured UI elements. Enhanced ShellView.axaml with Window.Resources for icons and updated StackPanel for navigation buttons. Added navigationStack and navigationStackIndex in NavigationFrame.cs to manage navigation history. Implemented GoBackAsync and NavigateToViewModelAsync<T> methods in NavigationFrame.cs. Added TryInjectParameters method for parameter injection into view models. Included logging statements in NavigationFrame.cs for detailed navigation actions.
Introduce `addToStack` parameter in `NavigateToViewModel` to control whether the view model is added to the navigation stack. Update `GoBackAsync` to pass `false` for `addToStack`, preventing the view model from being added to the stack when navigating back. Enhance navigation logic for better stack management.
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.
Copilot reviewed 2 out of 5 changed files in this pull request and generated 1 comment.
Files not reviewed (3)
- samples/features/Features.Avalonia/Views/NavigationSourceView.axaml: Language not supported
- samples/features/Features.Avalonia/Views/NavigationTargetView.axaml: Language not supported
- samples/features/Features.Avalonia/Views/ShellView.axaml: Language not supported
Comments suppressed due to low confidence (1)
src/Caliburn.Micro.Platform/Platforms/netcore-avalonia/NavigationFrame.cs:19
- [nitpick] The variable name navigationStackIndex should be checked for consistency with the rest of the codebase.
private List<object> navigationStack = new List<object>();
src/Caliburn.Micro.Platform/Platforms/netcore-avalonia/NavigationFrame.cs
Outdated
Show resolved
Hide resolved
src/Caliburn.Micro.Platform/Platforms/netcore-avalonia/NavigationFrame.cs
Fixed
Show resolved
Hide resolved
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.
Copilot reviewed 2 out of 5 changed files in this pull request and generated no comments.
Files not reviewed (3)
- samples/features/Features.Avalonia/Views/NavigationSourceView.axaml: Language not supported
- samples/features/Features.Avalonia/Views/NavigationTargetView.axaml: Language not supported
- samples/features/Features.Avalonia/Views/ShellView.axaml: Language not supported
This pull request includes several changes to enhance navigation functionality and improve the user interface in the Avalonia application. The most important changes include the addition of a
GoBack
method, updates to navigation views, UI improvements, and enhancements to theNavigationFrame
class.Enhancements to navigation functionality:
samples/features/Features.Avalonia/ViewModels/ShellViewModel.cs
: Added a newGoBack
method to handle backward navigation.src/Caliburn.Micro.Platform/Platforms/netcore-avalonia/NavigationFrame.cs
: Implemented navigation stack management and theGoBackAsync
method to support backward navigation. [1] [2] [3]Updates to navigation views:
samples/features/Features.Avalonia/Views/NavigationSourceView.axaml
: Replaced placeholder text with aGrid
containing aTextBox
,CheckBox
, andButton
.samples/features/Features.Avalonia/Views/NavigationTargetView.axaml
: Replaced placeholder text with aGrid
containing twoTextBlock
elements.UI improvements:
samples/features/Features.Avalonia/Views/ShellView.axaml
: AddedStreamGeometry
resources for icons and updated theStackPanel
background with a gradient. AddedPathIcon
elements to theGoBack
andGoHome
buttons for improved visual representation.Enhancements to parameter handling:
src/Caliburn.Micro.Platform/Platforms/netcore-avalonia/NavigationFrame.cs
: Added theTryInjectParameters
method to inject query string parameters into the view model.Closing #966