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

SpecialSlotsSource UI question

3 Answers 84 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Christie Admin
Top achievements
Rank 1
Christie Admin asked on 24 Apr 2014, 05:26 PM
Hi,

I'm using the Office2013 theme and I have a question regarding the SpecialSlotsSource. By default the control display horz and vert lines around each slot to seprate them and in our case, we use the SpecialSlotsSource to display some indications in some specials slots. The problem we have is, if we set the time ruler to 15 mins and we set a special slot duration to 30 mins, we lost the line between the two slots coverred by our special slot. I would like to know how I can at least change the color of the special slots to cover the slots without loosing the separator???

Thank's
Alain

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 28 Apr 2014, 08:51 AM
Hello Alain,

You just need to customize the SpecialSlotsStyleSelector of the ScheduleView and set the Opacity of the slots to a lower value, thus the lines will be displayed. Here is a quick example with the Office2013 theme:

<telerik:SpecialSlotStyleSelector x:Key="CustomSpecialSlotStyleSelector">
    <telerik:SpecialSlotStyleSelector.DefaultStyle>
        <Style TargetType="telerik:HighlightItem" BasedOn="{StaticResource HighlightItemStyle}">
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="Background" Value="{telerik:Office2013Resource ResourceKey=HighLightBrush}"/>
            <Setter Property="Opacity" Value="0.3"/>
        </Style>
    </telerik:SpecialSlotStyleSelector.DefaultStyle>
    <telerik:SpecialSlotStyleSelector.ReadOnlyStyle>
        <Style TargetType="telerik:HighlightItem" BasedOn="{StaticResource HighlightItemStyle}">
           <Setter Property="BorderThickness" Value="0"/>
           <Setter Property="Background" Value="{telerik:Office2013Resource ResourceKey=InvertedBrush}"/>
           <Setter Property="Opacity" Value="0.3"/>
        </Style>
    </telerik:SpecialSlotStyleSelector.ReadOnlyStyle>
 </telerik:SpecialSlotStyleSelector>

and then apply the CustomSpecialSlotStyleSelector to the ScheduleView:

<telerik:RadScheduleView  x:Name="ScheduleView"
    AppointmentsSource="{Binding Appointments}"
    SpecialSlotsSource="{Binding SpecialSlots}"
    SpecialSlotStyleSelector="{StaticResource CustomSpecialSlotStyleSelector}">
    ...
</telerik:RadScheduleView>

Hope this helps.

Regards,
Yana
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Christie Admin
Top achievements
Rank 1
answered on 29 Apr 2014, 12:11 PM
Hi Yana,

great :) One thing, for each special slots I created, I place a usercontrol inside for binding purpose.With the opacity, the usercontrol itself is affected by the opacity, can you tell me if it's possible to affect only the background of the usercontrol (ie: tranparent) not the content of the usercontrol???

Thank's
Alain
0
Yana
Telerik team
answered on 29 Apr 2014, 01:48 PM
Hi Alain,

You cannot set opacity only to the background - the content will be affected as well. The other option I'd suggest is that you try setting the transparency using alpha channel instead the opacity, please check this article for more details on the approach.

Regards,
Yana
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
ScheduleView
Asked by
Christie Admin
Top achievements
Rank 1
Answers by
Yana
Telerik team
Christie Admin
Top achievements
Rank 1
Share this question
or