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
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
Fixed already but forgot to close this post thanks for your time