public HaircutMinigamePage() { DesiredShape.LoadShapes(); ViewModel = new HaircutMinigameVM(); ViewModel.NewRoundStarted += OnNewRoundStarted; DataContext = ViewModel; InitializeComponent(); }
private void OnNewRoundStarted() { ViewModel.Dispose(); ViewModel = new HaircutMinigameVM(); ViewModel = new HaircutMinigameVM(); ViewModel.InjectOverlaySettings(OverlaySettings); ViewModel.InjectRouter(Router); ViewModel.NewRoundStarted += OnNewRoundStarted; DataContext = ViewModel; }