private void NavigateToViewMethod(string destination) { try { if (Destination != destination) { Destination = destination; switch (destination) { case "SafeDisplay": CurrentViewModel = new SafeDisplayViewModel(); break; case "SafeReport": CurrentViewModel = new SafeReportViewModel(); break; default: break; } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public SafeViewModel() { Destination = "SafeDisplay"; _currentViewModel = new SafeDisplayViewModel(); }