This question is locked. New answers and comments are not allowed.
I'm using a scheduleview that shows just a few data on every month, the problem is it makes a lot of white space because of the scheduleview's height.
Is there a way to make the group items height shorter? mainly the 'TimeRulerMonthViewItemStyle'. considering it wont break the calendar.
Is there a way to make the group items height shorter? mainly the 'TimeRulerMonthViewItemStyle'. considering it wont break the calendar.
4 Answers, 1 is accepted
0
Hello Ramil,
You can change the height of the slots in MonthView, as suggested in this thread. Use the GroupHeaderStyleSelector for this purpose. Here you can find more details on the selector and implementing it in your project.
Hope this helps.
Regards,
Dani
the Telerik team
You can change the height of the slots in MonthView, as suggested in this thread. Use the GroupHeaderStyleSelector for this purpose. Here you can find more details on the selector and implementing it in your project.
Hope this helps.
Regards,
Dani
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Ramski
Top achievements
Rank 1
answered on 28 Mar 2012, 12:52 AM
Hi Dani,
Thanks for the reply, I tried changing the MaxHeight of MonthViewBottomLevelWeekGroupStyle but it broke the layout of the calendar. Also tried using MinHeight instead, like the one you said in the other post but it didn't work. Any other way to change the height property for the MonthViewBottomLevelWeekGroupStyle?
Thanks,
Ramil
Thanks for the reply, I tried changing the MaxHeight of MonthViewBottomLevelWeekGroupStyle but it broke the layout of the calendar. Also tried using MinHeight instead, like the one you said in the other post but it didn't work. Any other way to change the height property for the MonthViewBottomLevelWeekGroupStyle?
Thanks,
Ramil
0
Hello Ramil,
Since width or height of the month view week group headers is equally divided, group headers cannot be set a fixed width or height, but can be manipulated through MinHeight and MaxHeight (or respective width) properties.
Well, changing the MinHeight or MaxHeight in your case is probably not working because the content of one or more of the group headers does not allow it, i.e. the text of some of the group headers cannot be minimized any more than it is now. This content is presented by a ContentPresenter which does not support TextTrimming so basically you cannot shrink the group headers any more.
What you can do is remove the rotation of the vertical group headers. The result will look something similar to the attached 01.png and 02.png. This is done by removing the LayoutTransformControl in the VerticalTemplate of the GroupHeaderTemplateSelector and leaving only a single ContentPresenter, instead:
Something else you can do is simply remove the week group headers by setting Height and Width to 0:
Result on the attached 03.png. Of course, that is if your scenario allows it.
I hope this info will help in your case.
Regards,
Dani
the Telerik team
Since width or height of the month view week group headers is equally divided, group headers cannot be set a fixed width or height, but can be manipulated through MinHeight and MaxHeight (or respective width) properties.
Well, changing the MinHeight or MaxHeight in your case is probably not working because the content of one or more of the group headers does not allow it, i.e. the text of some of the group headers cannot be minimized any more than it is now. This content is presented by a ContentPresenter which does not support TextTrimming so basically you cannot shrink the group headers any more.
What you can do is remove the rotation of the vertical group headers. The result will look something similar to the attached 01.png and 02.png. This is done by removing the LayoutTransformControl in the VerticalTemplate of the GroupHeaderTemplateSelector and leaving only a single ContentPresenter, instead:
<
local:GroupHeaderTemplateSelector.VerticalTemplate
>
<
DataTemplate
>
<
ContentPresenter
Content
=
"{Binding FormattedName}"
Width
=
"120"
/>
</
DataTemplate
>
</
local:GroupHeaderTemplateSelector.VerticalTemplate
>
Something else you can do is simply remove the week group headers by setting Height and Width to 0:
<
Style
x:Key
=
"MonthViewBottomLevelWeekGroupStyle"
TargetType
=
"local:GroupHeader"
BasedOn
=
"{StaticResource GroupHeaderBaseStyle}"
>
<
Setter
Property
=
"Margin"
Value
=
"0 0 0 -1"
/>
<
Setter
Property
=
"Height"
Value
=
"0"
/>
<
Setter
Property
=
"Width"
Value
=
"0"
/>
</
Style
>
Result on the attached 03.png. Of course, that is if your scenario allows it.
I hope this info will help in your case.
Regards,
Dani
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Hi,
And here are the screenshots.
Regards,
Dani
the Telerik team
And here are the screenshots.
Regards,
Dani
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>