Hi again. Here is what I'm currently using:
The trick is to use a single SpecialSlot to render a big time slot behind all horizontal timelines present in the view. Basically, it's like rendering weekend days as special slots, but just using a single slot that represents the time from your start time up to the current time.
Please see the attached screenshot first to determine whether this is something you can use.
Note: I'm using the TimelineView only in my app - no month/week/day views, so I have not tested using these views.
In XAML, you need to assign your own CustomSlotStyleSelector:
<telerik:RadScheduleView Name="timelineView"
...
SpecialSlotStyleSelector="{StaticResource CurrentTimeSlotStyleSelector}"
...>
and then define the style that your CustomSlotStyleSelector uses:
<!-- Custom slot used for indicating the current time and all historic time. -->
<ss:CurrentTimeSlotStyleSelector x:Key="CurrentTimeSlotStyleSelector">
<ss:CurrentTimeSlotStyleSelector.CurrentTimeSlotStyle>
<Style TargetType="telerik:HighlightItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Border Background="LightGray" Opacity="0.5" BorderBrush="DarkRed" BorderThickness="0,0,6,0" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ss:CurrentTimeSlotStyleSelector.CurrentTimeSlotStyle>
</ss:CurrentTimeSlotStyleSelector>
I'm using a bit of code-behind to assign the SpecialSlotsSource:
// Create a slot from start up to current time.
var slots = new List<Slot>();
slots.Add(new Slot(this._viewModel.RangeStart, DateTime.Now));
this.timelineView.SpecialSlotsSource = slots;
That's basically it. Hope that helps you.
Regards,
Thomas