How to disable animation for CellPointerOver event?

5 posts, 0 answers
  1. k
    k avatar
    3 posts
    Member since:
    Jan 2016

    Posted 01 Feb Link to this post

    Hi,

    How can I disable animation of a calendar cell when the mouse goes over it?

     

    Thanks

    Krzysztof 

     

  2. k
    k avatar
    3 posts
    Member since:
    Jan 2016

    Posted 01 Feb in reply to k Link to this post

    I will try to describe my problem more precisely.

    I use RadCalendar with a custom style selector:

    <telerik:RadCalendar x:Name ="Calendar"
                 DisplayMode="YearView"
                         CellStyleSelector="{StaticResource CustomCalendarStyleSelector}"                            
                        />

     

    public class CustomCalendarStyleSelector : CalendarCellStyleSelector
    {
     
        public DataTemplate MonthTemplate { get; set; }
     
        protected override void SelectStyleCore(CalendarCellStyleContext context, RadCalendar container)
        {
             context.CellTemplate = MonthTemplate;
             context.ApplyCellTemplateDecorations = false;
        }
         
    }

    My template contains an image, and when the  mouse pointer goes over image, it blinks, as it would be redrawn or animated. Is it possible to get rid of this blinking?

    Here is my DataTemplate:

    <templates:CustomCalendarStyleSelector x:Key="CustomCalendarStyleSelector" >
     
        <templates:CustomCalendarStyleSelector.MonthTemplate>
            <DataTemplate>
                <Image Source="/Assets/Icons/illness_64.png"
                  HorizontalAlignment="Center"
                  VerticalAlignment="Center"
                  Stretch="None"                            
                           >
                </Image>
            </DataTemplate>
        </templates:CustomCalendarStyleSelector.MonthTemplate>
     
    </templates:CustomCalendarStyleSelector>

  3. DevCraft banner
  4. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 04 Feb Link to this post

    Hello,

    I believe you need to customize the RadCalendar.PointerOverCellStyle. In your specific scenario you can try setting it to x:Null. More about customizing the cell styling can be found in our documentation.

    Please give this approach a try and let us know if you need any further assistance.

    Regards,
    Pavel R. Pavlov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. k
    k avatar
    3 posts
    Member since:
    Jan 2016

    Posted 04 Feb in reply to Pavel R. Pavlov Link to this post

    Well, i've tried that, but without success.

    The problem occurs only when DisplayMode is set to YearView and the app is deployed to local machine. On the Mobile Emulator I could not reproduce it. Strange ...

    Regards

    Krzysztof

     

     

  6. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 04 Feb Link to this post

    Hi Krzysztof,

    After further investigation we found the cause of this issue. It turned out that the CellTemplate of the affected (highlighted) cell is reapplied on every arrange cycle. This fact in combination with the fact that the images are loading a bit slower leads to the reported behavior. We logged this issue in our backlog for fixing in our future releases. As a small sign of compensation I updated your Telerik account accordingly.

    Regards,
    Pavel R. Pavlov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
DevCraft banner