Disable Animation on OnApplyTemplate

4 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.

  3. Richard
    Richard avatar
    1 posts
    Member since:
    Mar 2017

    Posted 19 Mar 2018 in reply to Guillaume Link to this post

    Hi Guillaume, I would like to know how to decompile and recompile the Telerik.Windows.Controls and Telerik.Windows.Controls.Input. I need to rewrite the ChangeScaleAndOpacity and set the TimeSpan to zero for me to able to remove the animation in the TransitionPanel. I use the JustDecompile App to decompile the said DLL and try to recompile it but there's a lot of errors. Can you please help me to resolve this? Thank you.

  4. Martin Ivanov
    Martin Ivanov avatar
    2511 posts

    Posted 22 Mar 2018 Link to this post

    Hello Richard,

    If you have a developer license for the product you can download the source code from your telerik.com account. You can read more about this in the Download Product Files article. However, before doing this I would strongly recommend you to go through the EULA of the UI for WPF product.

    Martin Ivanov
    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.
Back to Top