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

Disable mouseover highlighting slots in MonthView

3 Answers 168 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Brandon
Top achievements
Rank 1
Veteran
Brandon asked on 25 Jan 2018, 10:08 PM
I am using a RadScheduleView in MonthView only.  How can I disable highlighting the day slots on MouseOver, so that only the selected appointments are highlighted?  I tried editing the TimeRulerItemStyleSelector.MonthViewTickStyle and MonthViewTodayTickStyle so that the MouseOver VisualState in the RadButton and RadToggleButton templates was the same as the Normal VisualState, but that did not work.  I am having trouble finding the style the applies to the portion of the slot surrounding the appointments.  Any suggestions?

3 Answers, 1 is accepted

Sort by
0
Accepted
Dilyan Traykov
Telerik team
answered on 30 Jan 2018, 01:10 PM
Hello Brandon,

I believe you're looking for the MouseOverHighlightStyle and SelectionHighlightStyle properties which target the HighlightItem element that is actually the underlying slot. Here's an example of how to use the two properties:

<Style x:Key="MouseOverHighlightStyle" TargetType="telerik:HighlightItem" BasedOn="{StaticResource HighlightItemStyle}">
    <Setter Property="Background" Value="Transparent" />
</Style>
<Style x:Key="SelectionHighlightStyle" TargetType="telerik:HighlightItem" BasedOn="{StaticResource HighlightItemStyle}">
    <Setter Property="Background" Value="Transparent" />
</Style>

<telerik:RadScheduleView AppointmentsSource="{Binding Appointments}"
                         MouseOverHighlightStyle="{StaticResource MouseOverHighlightStyle}"
                         SelectionHighlightStyle="{StaticResource SelectionHighlightStyle}">

Please let me know whether this provides the desired result.

Regards,
Dilyan Traykov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Brandon
Top achievements
Rank 1
Veteran
answered on 31 Jan 2018, 10:40 PM

Dilyan,

That worked, thanks!

Out of curiosity, is there a way I could set a different MouseOver style for Appointments vs Slots?  Or am I limited to a single style for all elements?

0
Dilyan Traykov
Telerik team
answered on 02 Feb 2018, 02:59 PM
Hello Brandon,

Please have a look at the following article which explains how to style appointments via the AppointmentItem element.

Do let me know if you need assistance with the concrete implementation.

Regards,
Dilyan Traykov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
ScheduleView
Asked by
Brandon
Top achievements
Rank 1
Veteran
Answers by
Dilyan Traykov
Telerik team
Brandon
Top achievements
Rank 1
Veteran
Share this question
or