예제 #1
0
        private void AddButton_Click(object sender, RoutedEventArgs e)
        {
            var editComponent = new ElementEditComponent();

            var newTab = new TabItem {
                Header = "Добавить Элемент", Content = editComponent
            };

            ElementEditPanel_TabControl.Items.Add(newTab);
        }
예제 #2
0
        public void EditElement(ElementViewModel elementViewModel)
        {
            var editComponent = new ElementEditComponent(elementViewModel);

            var newTab = new TabItem {
                Header = elementViewModel.Title.Value, Content = editComponent
            };

            ElementEditPanel_TabControl.Items.Add(newTab);

            ElementEditPanel_TabControl.SelectedItem = ElementEditPanel_TabControl.Items.Count;
        }