public MainWindow() { this.DataContext = new NavigationViewModel(); dicesViewModel = new DicesViewModel(); InitializeComponent(); this.Closed += new EventHandler(MainWindow_Closed); }
private void StartGame(object parameter) { //nav.EndMainMusic(); dbOps.StartGameTransaction(SelectedPlayers, gameType); PlayGameView dicesView = new PlayGameView(); SelectedViewModel = new DicesViewModel(playerEngine); dicesView.DataContext = SelectedViewModel; }