About how NavigationView gets initialized... #1667
Unanswered
KIM-SEO-TAE
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First of all, thanks a lot for creating such a great library, WPF‑UI.
I’ve been working with C#/WPF for about a year now, trying to build a framework, and WPF‑UI has been a huge help.
I’ve been digging through the code, but I might still be missing some understanding.
The most useful control for me is definitely the NavigationView.
I think I understand how MainWindow can connect its NavigationView to IServiceProvider through INavigationService and INavigationViewPageProvider.
But then I saw in the Wpf.Ui.Demo.Mvvm sample that INavigationWindow is used in MainWindow, and it seems designed to return its INavigationView.
That made me wonder: wouldn’t it be more reasonable if INavigationService was the central piece, injecting both INavigationWindow and INavigationViewPageProvider, so that it connects INavigationView and INavigationViewPageProvider together?
Since I’m not a native English speaker, I tend to learn more from code samples than from docs.
What confuses me is that the initialization of NavigationView doesn’t seem standardized across samples.
If the intention was to provide multiple approaches, then the current structure makes sense.
But for me, having too many different access routes to INavigationView through the DI container is really confusing.
I’d love to hear your thoughts on this!
Beta Was this translation helpful? Give feedback.
All reactions