private void NavigateToViewMethod(string destination) { try { if (Destination != destination) { Destination = destination; switch (destination) { case "CategoryDisplay": CurrentViewModel = new CategoryDisplayViewModel(); break; case "ItemDisplay": CurrentViewModel = new ItemDisplayViewModel(); break; case "ItemOrder": CurrentViewModel = new ItemOrderViewModel(); break; default: break; } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public ItemViewModel() { Destination = "CategoryDisplay"; _currentViewModel = new CategoryDisplayViewModel(); }