This is a migrated thread and some comments may be shown as answers.

Resize font-size of calendar

2 Answers 345 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Jaspy
Top achievements
Rank 1
Jaspy asked on 25 Mar 2016, 09:42 AM

I re-size the calendar size and font size like picture 1.

But when I click the title, it will show a sub-form, the font-size of sub-form hasn't been changed (Shown in picture 2).

How can I re-size the font size of sub-form?

 

Regards

2 Answers, 1 is accepted

Sort by
0
Ralitsa
Telerik team
answered on 28 Mar 2016, 10:34 AM
Hi ,

Thank you for contacting us. 

In order to customize the font of the fast navigation popup, you need to subscribe to the PopupOpening event of RadDateTimePickerDropDown. At the moment, you should use reflection to access the popup. Please refer to the code snippet below how to achieve it: 
public Form1()
{
    InitializeComponent();
     
    this.radCalendar1.HeaderNavigationMode = Telerik.WinControls.UI.HeaderNavigationMode.Popup;
}
 
private void radButton1_Click(object sender, EventArgs e)
{
    this.radCalendar1.Size = new Size(this.radCalendar1.Size.Width + 100, this.radCalendar1.Size.Height + 50);
 
    CalendarNavigationElement a = this.radCalendar1.CalendarElement.CalendarNavigationElement;
    FieldInfo fi = typeof(CalendarNavigationElement).GetField("dropDown", BindingFlags.NonPublic | BindingFlags.Instance);
    RadDateTimePickerDropDown dropDown = (RadDateTimePickerDropDown)fi.GetValue(a);
    dropDown.PopupOpening += new RadPopupOpeningEventHandler(dropDown_PopupOpening);
}
 
void dropDown_PopupOpening(object sender, CancelEventArgs args)
{
    RadDateTimePickerDropDown dropDown = (RadDateTimePickerDropDown)sender;
    RadCalendarFastNavigationControl nav = (RadCalendarFastNavigationControl)dropDown.HostedControl;  
    foreach (var item in nav.Items)
    {
        item.Font = new Font("Segoe UI", 8, FontStyle.Regular);
    }
}

We are constantly improving the customization mechanism so I already have logged this in our Feedback Portal. You can track its progress, subscribe status changes and add your vote/comment to it on the following link - RadCalendar - expose properties in order to make the fast navigation popup easily customizable

I have also updated your Telerik Points for bringing this to our attention.

Let me know if you have any other questions.

Regards,
Ralitsa
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Jaspy
Top achievements
Rank 1
answered on 29 Mar 2016, 02:25 AM

Hi Ralitsa,

 

Thank you for your friendly reply. 

It helps me a lot.

 

Regards

Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Jaspy
Top achievements
Rank 1
Answers by
Ralitsa
Telerik team
Jaspy
Top achievements
Rank 1
Share this question
or