Пример #1
0
        private static void OnSelectedItemsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            MultiSelectComboBox control = (MultiSelectComboBox)d;

            control.SelectNodes();
            control.SetText();
        }
Пример #2
0
        private static void OnTextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            //var test = SelectedItems;
            MultiSelectComboBox control = (MultiSelectComboBox)d;

            if (control.SelectedItems != null)
            {
                StringBuilder displayText = new StringBuilder();
                foreach (Node s in control._nodeList)
                {
                    if (s.IsSelected == true)
                    {
                        displayText.Append(s.Title);
                        displayText.Append(',');
                    }
                }
                var text = (displayText.ToString().TrimEnd(new char[] { ',' }));
                if (e.NewValue.ToString() != text)
                {
                    d.SetValue(TextProperty, text);
                }
            }
            //control.SelectNodes();
            //control.SetText();
        }
Пример #3
0
        private static void OnCommandPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            MultiSelectComboBox control = d as MultiSelectComboBox;

            if (control == null)
            {
                return;
            }
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.TbName = ((System.Windows.Controls.TextBox)(target));
                return;

            case 2:
                this.CbStatus = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 3:
                this.MCbCategories = ((TachiShop.MultiSelectComboBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #5
0
        private static void OnItemsSourceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            MultiSelectComboBox control = (MultiSelectComboBox)d;

            control.DisplayInControl();
        }