How to style TKCalendarMonthTitleCell

2 posts, 0 answers
  1. Benjamin
    Benjamin avatar
    7 posts
    Member since:
    Feb 2013

    Posted 11 Oct Link to this post

    I would like to style or remove the title bar over the calendar, where the month name appears.

    It is a TKCalendarMonthTitleCell.

    I can't find any property to style it

    Any directions ?

     

  2. Emily
    Emily avatar
    6 posts
    Member since:
    Apr 2016

    Posted 11 Oct in reply to Benjamin Link to this post

    I removed it with custom renderers - 

    ios:

    public class OverrideCalendarRenderer : Telerik.XamarinForms.InputRenderer.iOS.CalendarRenderer
    {
        protected override void OnElementChanged(ElementChangedEventArgs<RadCalendar> e)
        {
            base.OnElementChanged(e);
            if (Control.Presenter is TKCalendarMonthPresenter)
            {
                (Control.Presenter as TKCalendarMonthPresenter).TitleHidden = true;
            }
        }
    }

    android:

    public class OverrideCalendarRenderer : CalendarRenderer
    {
        protected override void OnElementChanged(ElementChangedEventArgs<RadCalendar> e)
        {
            base.OnElementChanged(e);
            Control.ShowTitle = false;
        }
    }

  3. DevCraft banner
Back to Top