Disable Animation on OnApplyTemplate

2 posts, 0 answers
  1. Guillaume
    Guillaume avatar
    2 posts
    Member since:
    May 2016

    Posted 31 May 2016 Link to this post

    Hi everyone,

    I am currently creating a control syncing a RadScheduleView with RadTimeBar and RadCalendar.

    The controls are pretty great, and everthing works so far, but I have one problem on the UI itself :

    The RadCalendar is using a DayTemplateSelector to mark days corresponding to appointements in the RadScheduleView, and when these appointements are being edited, I use

    to refresh properly.

    The data itself is ok, but each time some sort of Zoom/Popup effect is used on the RadCalendar : See the attached capture to see what I mean.

    I just want to disable this animation, but wasn't able to find it on the defaut template.

    Could you help me?

    (I know I could use something like

    DataTemplateSelector dts = calendar.DayTemplateSelector;
    calendar.DayTemplateSelector = null;
    calendar.DayTemplateSelector = dts;

    instead, wich resolve that issue, but also freeze the control for half a second each time, annoying)


    Thanks a lot!

  2. Guillaume
    Guillaume avatar
    2 posts
    Member since:
    May 2016

    Posted 23 Jun 2016 in reply to Guillaume Link to this post

    Well, I did find some sort of solution, but I had to mess around with your code :

    On the namespace Telerik.Windows.Controls.Calendar , the class CalendarAnimation was handling these animations with this method :

    internal static void ChangeScaleAndOpacity(FrameworkElement target, double? scaleFrom, double? scaleTo, double? opacityFrom, double? opacityTo, TimeSpan duration, Action<FrameworkElement> action)

    So I went to the class TransitionPanel and modify all calls to this method with a duration of TimeSpan.Zero instead of 300ms.

    Compiled and used the new dll : So far it seems to be working, maybe I could improve by removing the animations entirely but meh.


    Basically my RadCalendar's days and RadScheduleView's appointements are synchronized, I just call calendar.OnApplyTemplate() each time I modifiy my appointements.

    Could post more code if anyone interested.

Back to Top