private void ListViewMenu_SelectionChanged(object sender, SelectionChangedEventArgs e) { UserControl usc = null; GridMain.Children.Clear(); ListViewItem item = ((ListView)sender).SelectedItem as ListViewItem; MainWindow mainWindow = null; switch (item.Name) { case "ItemHome": usc = new TaskSolverWnd(); GridMain.Children.Add(usc); break; case "ItemLogout": mainWindow = (MainWindow)Window.GetWindow(this); mainWindow.ShowLoginWindow(); break; default: break; } }
private void InitializeDefaultWindow() { UserControl usc = new TaskSolverWnd(); GridMain.Children.Add(usc); }