Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Update Avalonia UI features #967

wants to merge 3 commits into from

Conversation

vb2ae
Copy link
Member

@vb2ae vb2ae commented Jan 20, 2025

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 the NavigationFrame class.

Enhancements to navigation functionality:

Updates to navigation views:

UI improvements:

Enhancements to parameter handling:

Closing #966

vb2ae added 2 commits January 18, 2025 07:28
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.
@vb2ae vb2ae requested a review from Copilot January 20, 2025 17:52
Copy link

@Copilot Copilot AI left a 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>();

@vb2ae vb2ae requested a review from Copilot January 20, 2025 18:48

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
@vb2ae vb2ae requested a review from KasperSK January 20, 2025 21:24
@vb2ae vb2ae changed the title Update features Update Avalonia UI features Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant