Beispiel #1
0
        private void AddComboProperty()
        {
            var obj = ComboProperty;

            if (obj == null)
            {
                obj = ComboProperty = new ComboBox();

                obj.Style             = TC.ComboPropertyStyle;
                obj.GotFocus         += TC.ComboProperty_GotFocus;
                obj.SelectionChanged += TC.ComboProperty_SelectionChanged;
                obj.KeyDown          += TC.ComboProperty_KeyDown;
                obj.DataContext       = this;
            }

            obj.ItemsSource   = PropertyModel.GetListValue(TC.TCM.Root);
            obj.SelectedIndex = PropertyModel.GetIndexValue(TC.TCM.Root);

            StackPanel.Children.Add(obj);
        }