protected override void OnMouseClick(MouseEventArgs e) { base.OnMouseClick(e); CalendarMonthCellMouseClickEventArgs eventArgs = new CalendarMonthCellMouseClickEventArgs() { Month = month }; if (MonthCellMouseClick != null) { MonthCellMouseClick(this, eventArgs); } }
private void CalendarMonthCell_MouseClick(object sender, CalendarMonthCellMouseClickEventArgs e) { foreach (CalendarMonthCell cell in monthCells) { if (cell.Month != e.Month) { cell.IsSelected = false; } } month = e.Month; FillDate(); this.Invalidate(); }