System.Windows.Forms.MonthCalendar.MonthCalendar C# (CSharp) Method

MonthCalendar() public method

public MonthCalendar ( ) : System
return System
        public MonthCalendar()
        {
            _firstDayOfWeek = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.FirstDayOfWeek;

            BackColor = Color.White;
            CellWidth = 31;
            DaysShort = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.AbbreviatedDayNames;
            Size = new Size(CellWidth * 7 + 6, 158);
            ShowToday = true;
            TitleBackColor = Color.Transparent;
            TitleForeColor = Color.FromArgb(42, 42, 42);
            TodayDate = DateTime.Now;
            Value = DateTime.Now;

            Button prevMonthButton = new Button();
            prevMonthButton.Image = ApplicationBehaviour.Resources.Images.ArrowLeft;
            prevMonthButton.ImageColor = Color.FromArgb(48, 48, 48);
            prevMonthButton.Size = new Size(16, 16);
            prevMonthButton.Location = new Point(4, 8);
            prevMonthButton.BorderColor = Color.Transparent;
            prevMonthButton.BorderHoverColor = Color.Transparent;
            prevMonthButton.BackColor = Color.Transparent;
            prevMonthButton.Click += (s, a) => { SetDate(_selectedDate.AddMonths(-1)); };
            Controls.Add(prevMonthButton);

            Button nextMonthButton = new Button();
            nextMonthButton.Anchor = AnchorStyles.Right;
            nextMonthButton.Image = ApplicationBehaviour.Resources.Images.ArrowRight;
            nextMonthButton.ImageColor = Color.FromArgb(48, 48, 48);
            nextMonthButton.Size = new Size(16, 16);
            nextMonthButton.Location = new Point(Width - nextMonthButton.Width - 4, 8);
            nextMonthButton.BorderColor = Color.Transparent;
            nextMonthButton.BorderHoverColor = Color.Transparent;
            nextMonthButton.BackColor = Color.Transparent;
            nextMonthButton.Click += (s, a) => { SetDate(_selectedDate.AddMonths(1)); };
            Controls.Add(nextMonthButton);

            _months = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.MonthNames;
        }