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

[Feature] Implement Navigation Frame with Dependency Injection for Enhanced Navigation #26

Open
dzhukovsky opened this issue Apr 20, 2024 · 2 comments

Comments

@dzhukovsky
Copy link

dzhukovsky commented Apr 20, 2024

Description

I would like to propose a new feature that integrates Dependency Injection (DI) directly into pages to facilitate smoother interaction with the NavigationService and to enable the seamless passing of various types of parameters between pages. This could include anything from record IDs to custom service implementations.

Motivation

The main goal of this feature is to enhance the usability of the NavigationService by leveraging DI, thus simplifying the process of parameter passing and service management during navigation. This approach would make it more convenient to work with complex dependencies and parameters within our navigation framework.

Proposed Solution

Implement a Navigation Frame that incorporates DI to allow for:

  • Direct injection of services into pages.
  • Easy parameter passing between pages with support for various data types.

Implementation Details

Here is a preliminary example of how this can be implemented in WinUI 3 and .NET 8:
(to build the project, please use the *.nupkg files located in the root of the archive)

DemoApp.zip

@dzhukovsky
Copy link
Author

@ghost1372

@ghost1372
Copy link
Contributor

Hi @dzhukovsky
Thank you for your request.
Sorry for the late reply, I tested your project but I didn't have enough time to review it.
I'm a little busy these days and I'm just making simple and small changes.
Therefore, If you would like to send a PR, I will check it when I have free time🙏

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

No branches or pull requests

2 participants