Пример #1
0
        public MainWindow()
        {
            InitializeComponent();
            UserControl usc = null;

            GridMain.Children.Clear();
            usc = new UserControlHome();
            GridMain.Children.Add(usc);
        }
Пример #2
0
        private void ListViewMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            UserControl usc = null;

            GridMain.Children.Clear();

            switch (((ListViewItem)((ListView)sender).SelectedItem).Name)
            {
            case "ItemHome":
                usc = new UserControlHome();
                GridMain.Children.Add(usc);
                break;

            case "ItemCreate":
                usc = new UserControlCreate();
                GridMain.Children.Add(usc);
                break;

            default:
                break;
            }
        }