Navigation zwischen views Funktioniert

This commit is contained in:
HuskyTeufel
2021-09-14 20:37:33 +02:00
parent bbffb270bc
commit f6dd834f34
16 changed files with 210 additions and 98 deletions

View File

@@ -6,9 +6,9 @@ using System.Windows.Input;
namespace DaSaSo.ViewModel.State.Navigation
{
public class Navigator : INavigator, INotifyPropertyChanged
public class Navigator : ObservableObject, INavigator
{
public event PropertyChangedEventHandler? PropertyChanged;
private BaseViewModel _currentViewModel;
public BaseViewModel CurrentViewModel
{
@@ -19,17 +19,5 @@ namespace DaSaSo.ViewModel.State.Navigation
OnPropertyChanged();
}
}
public ICommand UpdateViewModelCommand { get; set; }
public Navigator(IViewModelAbstractFactory viewModelFactory)
{
UpdateViewModelCommand = new UpdateCurrentViewModelCommand(this, viewModelFactory);
}
protected void OnPropertyChanged([CallerMemberName]string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}