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

SpecialSlot style, the container hasn't got fixed size

1 Answer 49 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 27 Jul 2011, 10:35 AM
Hi,
I am using SpecialSlot style in order to add a rectangle with some text on a slot. I am facing a difficulty since it's not a pattern that repeats itself like in the readonly brush example.
Here is the Content Template of my slot (assigned then by a SpecialSlotStyleSelector like in the examples).
           <ControlTemplate x:Key="VacationSlotTemplate">
               <Border Background="Black"  Opacity="0.655" VerticalAlignment="Stretch">
                   <Border  HorizontalAlignment="Left" Background="#FFDC1818">
                       <TextBlock Text="MD" 
                   Foreground="Azure"  FontSize="12px" HorizontalAlignment="Center"  TextAlignment="Center" Width="13" TextWrapping="Wrap"  />
                   </Border>
               </Border>
           </ControlTemplate>
Indeed, the text stays positionned relative to the top of the border in the viewPort, not positionned relative to the real border which is not shown completely on the viewport, it seems that the border is drawn such that it always begin inside the viewport (maybe for performance reasons?).
Hard to explain, I hope the screens will help :  screen1, screen2 
 The screen2 is the same as screen1 except that it is scrolled down a little bit in order to show that the border isn't at fixed position in the scheduler. In the second screen I shouldn't see the text since I have scrolled down.
Is this expected behavior? If so, can I remove this behavior?

Thanks

1 Answer, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 29 Jul 2011, 10:58 AM
Hello Thomas,

What happens is that the special slot by default gets stretched down to fill up the entire date group header. It is rendered  on top of the grid containing the time ruler items. You are correct that such a layout was created mostly for performance reasons.

I suggest that you try configuring the RecurrencePattern of your special slot in such a way that it matches the minor and major tick lengths. This will produce numerous special slots having the same style and will be displayed as matching the highlight items below.

Please, check this blog post which includes the subject of setting recurrence patterns for special slots.

I hope this will be helpful.

Greetings,
Dani
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
ScheduleView
Asked by
Thomas
Top achievements
Rank 1
Answers by
Dani
Telerik team
Share this question
or