Declined
Last Updated: 30 Jul 2020 09:18 by ADMIN
Franz
Created on: 23 Jul 2020 14:43
Category: ScheduleView
Type: Bug Report
1
scheduleview

I have discovered a bug that appears when a RadScheduleView is used with the ScheduleViewStyleSelector to style the appointments and the theme is changed.

Steps to reproduce:

  1. Setup a WPF project.
  2. Use implicit styles with a theme (e.g. Office_Black).
  3. Create a possibility to change the theme on runtime (e.g. to Fluent). (https://docs.telerik.com/devtools/wpf/styling-and-appearance/how-to/styling-apperance-themes-runtime)
  4. Create a dialog with a RadScheduleView that uses a custom ScheduleViewStyleSelector as AppointmentStyleSelector. (https://docs.telerik.com/devtools/wpf/controls/radscheduleview/styles-and-templates/appointment-style)
  5. Create at least one appointment.
  6. Start application.
  7. Change theme at runtime.

Result: The "old" appearance of the appointments stays after changing the theme.

Expected behavior: The appearance of the appointments changes according to the new theme.

 

I have attached a solution with the described behavior and an image of the outcome.

1 comment
ADMIN
Kalin
Posted on: 30 Jul 2020 09:18

Hello Franz,

Thank you for contacting us.

This is expected because the custom style was initially based on a Style from the Fluent theme. After changing the theme the style won't get rebased. In order to support such a scenario you would need to simply move the StyleSelector into a ResourceDictionary and merge it every time the theme changes. This way the custom Appointment Style will be always based on the style from the correct theme.

For your convenience I have modified the sample project. Please check it and let me know if you have any other questions.

Hope this helps.

Regards,
Kalin
Progress Telerik

Attached Files: