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

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

2 Answers 39 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Eric
Top achievements
Rank 1
Eric asked on 19 Aug 2015, 09:52 AM

Hi,

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 Answers, 1 is accepted

Sort by
0
Accepted
Jack
Telerik team
answered on 19 Aug 2015, 10:51 AM
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;

Regards,
Jack
Telerik
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
0
Eric
Top achievements
Rank 1
answered on 19 Aug 2015, 11:01 AM

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.

Tags
Calendar
Asked by
Eric
Top achievements
Rank 1
Answers by
Jack
Telerik team
Eric
Top achievements
Rank 1
Share this question
or