C
C#17mo ago
Mohammed85

Need help with changing the value of a object without self reference

I need the funcation in MenuButtonsViewModel to set the value of CurrentView.View and when CurrentView.View value changes i want the value of current view in MainViewModel to be set to it, there needs to be no self refrance as MainViewModel run MenuButtons
5 Replies
Mohammed85
Mohammed85OP17mo ago
Denis
Denis17mo ago
Create a navigation manager. You call it from the viewmodel to change to a different page The main view will listen to a page changed event in the navigation manager, and will load the corresponding page Not sure if WPF has a built in solution... It might, check it out Or check out community toolkit mvvm, it might also have a solution for this
Mohammed85
Mohammed85OP17mo ago
Fixed already but forgot to close this post thanks for your time
Want results from more Discord servers?
Add your server