/// <summary> /// Переход между пунктами меню /// </summary> /// <param name="sender">Объект по которому проиошел клик</param> /// <param name="e">Событие</param> public void ListViewMenu_SelectionChanged(object sender, SelectionChangedEventArgs e) { System.Windows.Controls.UserControl usc = null; GridMain.Children.Clear(); switch (((System.Windows.Controls.ListViewItem)((System.Windows.Controls.ListView)sender).SelectedItem).Name) { case "ItemList": usc = new UserControlList(); GridMain.Children.Add(usc); break; case "ItemCreate": usc = new UserControlCreate(); GridMain.Children.Add(usc); break; case "ItemSettings": usc = new UserControlSettings(); GridMain.Children.Add(usc); break; default: break; } }
/// <summary> /// Кнопка перехода в окно настроек /// </summary> /// <param name="sender">Объект по которому проиошел клик</param> /// <param name="e">Событие</param> private void ButtonSettings_Click(object sender, RoutedEventArgs e) { System.Windows.Controls.UserControl usc = null; GridMain.Children.Clear(); usc = new UserControlSettings(); GridMain.Children.Add(usc); }
public UserControlSettings() { InitializeComponent(); ReadSettings("read"); UCS = this; }