Example #1
0
        protected override void OnMouseClick(MouseEventArgs e)
        {
            base.OnMouseClick(e);

            if (e.Button != MouseButtons.Left)
            {
                return;
            }

            if (IsMouseInsideDropDownButton() == false)
            {
                return;
            }

            var screenLocation = PointToScreen(Point.Empty);

            screenLocation.Offset(0, Height);

            monthControl = new MonthCalendar();
            monthControl.uwfInnerPadding = new Padding(0);
            monthControl.uwfContext      = true;
            monthControl.uwfShadowBox    = true;
            monthControl.Location        = screenLocation;
            monthControl.Value           = Value;
            monthControl.DateChanged    += (sender, args) =>
            {
                Value = monthControl.Value;

                monthControl.Dispose();
            };
        }