Beispiel #1
0
        protected virtual void OnDropDownCancel(DropDownCancelEventArgs e)
        {
            if (this.DropDownCancel != null)
            {
                this.DropDownCancel(this, e);

                if (!e.Cancel)
                {
                    _skipClose = true;
                }
            }
        }
        protected virtual void OnDropDownCancel(DropDownCancelEventArgs e)
        {
            if (this.DropDownCancel != null)
            {
                this.DropDownCancel(this, e);
            }

            if (!e.Cancel)
            {
                _owner.CloseDropDown();
                _dropDown = null;                                                       // Clear reference for GC
            }
        }
Beispiel #3
0
        private void DropDownHelper_DropDownCancel(object sender, DropDownCancelEventArgs e)
        {
            if (this.Bounds.Contains(Parent.PointToClient(e.CursorLocation)))
            {
                e.Cancel = true;
            }
            else
            {
                IDropDownAware dropDown = (e.DropDown as IDropDownAware);

                if (dropDown != null)
                {
                    dropDown.FinishEditing -= new DropDownValueChangedEventHandler(DropDown_FinishEditing);
                    dropDown.ValueChanged  -= new DropDownValueChangedEventHandler(DropDown_ValueChanged);
                }

                OnDropDownClosed(e);
            }
        }
Beispiel #4
0
 private void Popup_Cancel(object sender, DropDownCancelEventArgs e)
 {
     OnDropDownCancel(e);
 }