Exemple #1
0
        /// <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;
            }
        }
        public UserControlCreate()
        {
            InitializeComponent();
            UCC = this;

            #region Установка размеров окна

            double width  = MainWindow.MW.GridMain.ActualWidth;
            double height = MainWindow.MW.GridMain.ActualHeight;

            this.Width  = width;
            this.Height = height;

            CreateGrid.Width  = width;
            CreateGrid.Height = height;

            #endregion
        }