How to increase numbers font size in the calendar control

4 posts, 0 answers
  1. Veshala
    Veshala avatar
    27 posts
    Member since:
    Aug 2009

    Posted 03 Aug 2009 Link to this post


    We are in the process of increasing the font size for all controls within our windows application.
    I could not figure out how to increase the numbers font size in the Calendar control.

  2. Boyko Markov
    Boyko Markov avatar
    610 posts

    Posted 04 Aug 2009 Link to this post

    Hello Veshala,

    Thank you for writing. Here is a sample code which demonstrates how to modify the Font property of RadCalendar cells:

         RadCalendarElement calendarElement = this.radCalendar1.CalendarElement;
                MonthViewElement monthViewElement = (MonthViewElement)calendarElement.CalendarVisualElement;
                CalendarTableElement table =monthViewElement.TableElement;
                foreach(CalendarCellElement cell in table.Children )
                    cell.Font = new Font(cell.Font, FontStyle.Bold);

    You can also modify any other properties of CalendarCellElement such as BackColor, ForeColor. You can also find the cell position in the calendar table using the Row and Column properties.

    To check whether a specific cell is a header cell i.e a cell from the Row header or Column header you can do the following:

           bool isHeaderCell = (bool)cell.GetValue(CalendarCellElement.IsHeaderCellProperty);

    Please write me back if you need more information.

    Best wishes,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Mike
    Mike avatar
    3 posts
    Member since:
    Jul 2011

    Posted 22 Jul 2015 in reply to Boyko Markov Link to this post

    i've tried this, and am using the zoom header navigation mode... whenever i use the zoom navigation i lose the font settings for the calendar items, is there an event i need to refresh the font settings on, or could there be a global way of overriding the font so i dont have to set it for every single cell?


    also is there any way to make the fastforward, fastreverse, next and previous arrows larger on the calendar header?

  4. Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    4170 posts

    Posted 27 Jul 2015 Link to this post

    Hello Mike,

    Thank you for writing.

    In order to change the font of RadCalendar cell elements it is appropriate to use the RadCalendar.ElementRender event:
    Font f = new Font("Arial", 12f, FontStyle.Bold);
    private void radCalendar1_ElementRender(object sender, Telerik.WinControls.UI.RenderElementEventArgs e)
        e.Element.Font = f;

    As to the question about customizing the header elements, you can access each item from the CalendarElement.CalendarNavigationElement and specifies the desired MinSize:
    this.radCalendar1.CalendarElement.CalendarNavigationElement.NextButton.MinSize = new Size(50, 30);

    I hope this information helps. Should you have further questions, I would be glad to help.
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top