Exemple #1
0
        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());
            }
        }
Exemple #2
0
 public ItemViewModel()
 {
     Destination       = "CategoryDisplay";
     _currentViewModel = new CategoryDisplayViewModel();
 }