I need to navigate from one usercontrol to another with a button click, and i'm using two different approaches.

Approach 1: I have a main window with some buttons that will select my "parent" user control view model, using the Navigation Controller.
public NavigationController(MainWindowViewModel viewModel)
{
this.viewModel = viewModel;
}
public void Execute(object parameter)
{
string par = parameter.ToString();
switch (par)
{
case "0":
viewModel.SelectedViewModel = new ViewModel1();
break;
case "1":
viewModel.SelectedViewModel = new ViewModel2();
break;
}
}
XAML side (...)
<Button Command="{Binding NavigationController}" CommandParameter="1" />
<ContentControl Content="{Binding SelectedViewModel}" />
So far so good, and I believe this is a good tactic. But for Approach 2, where I have the proper "parent" user control selected, the button click is bound in a different way: XAML
<Button cal:Message.Attach="ShowUserControl3()"/>
VM
public object SelectedActionViewModel
{
get => _selectedActionViewModel;
set
{
_selectedActionViewModel = value;
}
}
public void ShowUserControl3()
{
_selectedActionViewModel = new VMusercontrol3();
OnPropertyChanged(nameof(SelectedActionViewModel));
}
And this second approach works fine.. on the first or second time i click the button. After that, the OnPropertyChanged keeps passing null and won't select the proper user control anymore. What am i missing here?
Extra question: how can I select UserControl3 from UserControl4 ?
Edit: All of the user controls inherit from a BaseViewModel, and that is where things are weird, because the propertyChanged is null
public class BaseViewModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public event EventHandler ClosingRequest;
protected void OnPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}
null" as in thePropertyChangedevent beingnull? How do you click the button when the view has been deselected? - mm8