public void HideDropDown()
        {
            if (this.dropdown == null)
            {
                return;
            }
            if (!this.dropdown.Disposing && !this.dropdown.IsDisposed)
            {
                this.dropdown.Dispose();
            }
            this.dropdown = null;

            this.EmitInvalidate();
        }
        public void ShowDropDown()
        {
            if (this.dropdown != null)
            {
                return;
            }
            if (this.ReadOnly)
            {
                return;
            }
            PropertyGrid parentGrid = this.Parent.ParentGrid;

            this.dropdown = new MultiComboBoxDropDown(this.dropdownItems);
            for (int i = 0; i < this.dropdown.Items.Count; i++)
            {
                this.dropdown.SetItemChecked(i, this.selectedObjects.Contains(this.dropdown.Items[i]));
            }

            Size dropDownSize = new Size(
                this.rect.Width,
                Math.Min(this.dropdownHeight, this.dropdown.PreferredHeight));

            Point dropDownLoc = new Point(
                this.rect.X + parentGrid.AutoScrollPosition.X,
                this.rect.Y + parentGrid.AutoScrollPosition.Y);

            dropDownLoc.Y += this.rect.Height + 1;

            this.dropdown.Location         = dropDownLoc;
            this.dropdown.Size             = dropDownSize;
            this.dropdown.RequestClose    += this.dropdown_RequestClose;
            this.dropdown.AcceptSelection += this.dropdown_AcceptSelection;

            this.popupControl.Show(parentGrid, this.dropdown, dropDownLoc.X, dropDownLoc.Y, dropDownSize.Width, dropDownSize.Height, PopupResizeMode.None);

            this.EmitInvalidate();
        }
        public void ShowDropDown()
        {
            if (this.dropdown != null) return;
            if (this.ReadOnly) return;
            PropertyGrid parentGrid = this.Parent.ParentGrid;

            this.dropdown = new MultiComboBoxDropDown(this.dropdownItems);
            for (int i = 0; i < this.dropdown.Items.Count; i++)
                this.dropdown.SetItemChecked(i, this.selectedObjects.Contains(this.dropdown.Items[i]));

            Size dropDownSize = new Size(
                this.rect.Width,
                Math.Min(this.dropdownHeight, this.dropdown.PreferredHeight));

            Point dropDownLoc = new Point(
                this.rect.X + parentGrid.AutoScrollPosition.X,
                this.rect.Y + parentGrid.AutoScrollPosition.Y);
            dropDownLoc.Y += this.rect.Height + 1;

            this.dropdown.Location = dropDownLoc;
            this.dropdown.Size = dropDownSize;
            this.dropdown.RequestClose += this.dropdown_RequestClose;
            this.dropdown.AcceptSelection += this.dropdown_AcceptSelection;

            this.popupControl.Show(parentGrid, this.dropdown, dropDownLoc.X, dropDownLoc.Y, dropDownSize.Width, dropDownSize.Height, PopupResizeMode.None);

            this.EmitInvalidate();
        }
        public void HideDropDown()
        {
            if (this.dropdown == null) return;
            if (!this.dropdown.Disposing && !this.dropdown.IsDisposed)
                this.dropdown.Dispose();
            this.dropdown = null;

            this.EmitInvalidate();
        }