Remove the space taken by the Month/Title in week-mode

Thread is closed for posting
3 posts, 1 answers
  1. Eric
    Eric avatar
    16 posts
    Member since:
    May 2014

    Posted 19 Aug 2015 Link to this post


    Please see the first attached image. I would like to remove the whitespace which is marked with red. To clear the month name (or Title) I overridden the UpdateVisualsForCell in my own CalendarDelegate:

    else if (cell is TKCalendarTitleCell)
    var title = cell as TKCalendarTitleCell;
    title.Hidden = true;
    title.Label.Text = string.Empty;

    But it seems like it is still taking up the space. I would like to have the day names closer to the Navigation Bar. See the second attachment "Capture Desired Result.png".


    Many thanks in advance.

  2. Answer
    Jack avatar
    2333 posts

    Posted 19 Aug 2015 Link to this post

    Hello Eric,

    This is possible by setting the TitleCellHeight property to 0. Consider the following code:
    TKCalendarMonthPresenter presenter = (TKCalendarMonthPresenter)this.CalendarView.Presenter;
    presenter.Style.TitleCellHeight = 0;

    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
  3. Eric
    Eric avatar
    16 posts
    Member since:
    May 2014

    Posted 19 Aug 2015 in reply to Jack Link to this post

    Thanks Jack!

    I found another way. I didn't knew that you can use the MonthPresenter for the WeekView. Within the MonthPresenter I've set this property:

    var monthPresenter = (TKCalendarMonthPresenter)TelerikCalendarControl.Presenter;
    monthPresenter.TitleHidden = true;

    Thanks for showing me.

Back to Top