private void NavigateToViewMethod(string destination) { try { if (Destination != destination) { Destination = destination; switch (destination) { case "SpendingDisplay": CurrentViewModel = new SpendingDisplayViewModel(); break; case "SpendingReport": CurrentViewModel = new SpendingReportViewModel(); break; default: break; } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public SpendingViewModel() { Destination = "SpendingDisplay"; _currentViewModel = new SpendingDisplayViewModel(); }