Esempio n. 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);
        }
Esempio n. 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;
        }