C
C#5mo ago
Boom

Creating an app, is NavigationWindow the way to go to have multiple pages?

just starting my journey with app dev and wanted to create multiple pages within my app. Is NavigationWindow the best way to go about this? I see other options such as NavigationService and Frames and just get a little confused at what way i should be going
10 Replies
Boom
BoomOP5mo ago
i also see this tutorial here which scanning through it seems alot more complicated and different to whatever i did https://www.youtube.com/watch?v=wFzmBZpjuAo&ab_channel=Payload
Payload
YouTube
WPF Switching Views With Navigation Using MVVM And Dependency Injec...
WPF Switching Views With Navigation Using MVVM And Dependency Injection this tutorial will show you how to switch views in wpf using MVVM and dependency injection using C# the programming language and WPF the programming UI framwork in order to navigate through multiple views you can use this with multiple windows as well this is a tutorial and ...
Boom
BoomOP5mo ago
is MVVM the way to go?
leowest
leowest5mo ago
yes UserControl serving as pages MVVM pattern
leowest
leowest5mo ago
these days a lot of the boilerplate is done using CommunityToolkit or ReactiveUI, replacing that whole bunch of INPC code. and yes its a bit complex to get into if u dont have some experience with c# and WPF already one thing I would advise against thou is the folder structure in both videos but that is something u can figure out later... instead I would recommend a feature structure which makes it a lot easier to organize everything
leowest
leowest5mo ago
No description
leowest
leowest5mo ago
there are essentially 2 ways to display a usercontrol, directly calling it, i.e.:
<myControl:Something />
<myControl:Something />
alternatively you use a ContentControl where not only you can swap which usercontrol to display, but you can also have it display based on a type(aka its ViewModel and have it display the control based on the VM) in this scenario your Window, becomes a shell that will be housing all further usercontrols and controls
Boom
BoomOP5mo ago
thanks so much for your response ill dive into setting up the MVVM later on and so dont really have any further questions for now but is it ok if i stumble into anything i can just shoot you a message here?
leowest
leowest5mo ago
you can open a new help thread with the specific question or ask in #gui I am sure u will have many MVVM is very peculiar in how to do things and split responsability asking on #gui is probably preferable for MVVM questions imo as there are multiple people there that can help as people have their different timezone and all
Boom
BoomOP5mo ago
great then thanks so much really appreciate your time
Want results from more Discord servers?
Add your server