Example #1
0
        public MultiselectComboBox()
            : base()
        {
            InitializeComponent();
            _CheckBoxProperties = new CheckBoxProperties();
            _CheckBoxProperties.PropertyChanged += new EventHandler(_CheckBoxProperties_PropertyChanged);
            _CheckBoxComboBoxListControl         = new MultiselectComboBoxListControl(this);
            _CheckBoxComboBoxListControl.Items.CheckBoxCheckedChanged += new EventHandler(Items_CheckBoxCheckedChanged);
            _CheckBoxComboBoxListControl.Dock = DockStyle.Fill;
            MultiselectComboBoxListControlContainer container = new MultiselectComboBoxListControlContainer();

            container.Padding = new Padding(4, 0, 0, 14);
            container.Controls.Add(_CheckBoxComboBoxListControl);
            DropDownControl         = container;
            PopupDropDown.Resizable = true;
            this.Click += new EventHandler(MultiselectComboBox_Click);
        }
 internal void ApplyProperties(CheckBoxProperties properties)
 {
     this.Appearance   = properties.Appearance;
     this.AutoCheck    = properties.AutoCheck;
     this.AutoEllipsis = properties.AutoEllipsis;
     this.AutoSize     = properties.AutoSize;
     this.CheckAlign   = properties.CheckAlign;
     this.FlatAppearance.BorderColor        = properties.FlatAppearanceBorderColor;
     this.FlatAppearance.BorderSize         = properties.FlatAppearanceBorderSize;
     this.FlatAppearance.CheckedBackColor   = properties.FlatAppearanceCheckedBackColor;
     this.FlatAppearance.MouseDownBackColor = properties.FlatAppearanceMouseDownBackColor;
     this.FlatAppearance.MouseOverBackColor = properties.FlatAppearanceMouseOverBackColor;
     this.FlatStyle   = properties.FlatStyle;
     this.ForeColor   = properties.ForeColor;
     this.RightToLeft = properties.RightToLeft;
     this.TextAlign   = properties.TextAlign;
     this.ThreeState  = properties.ThreeState;
 }