Animation not working

2 posts, 0 answers
  1. Stephan
    Stephan avatar
    29 posts
    Member since:
    May 2013

    Posted 18 May 2014 Link to this post

    Hi Telerik Team,

    I looked into the documentation and the tutorial video to add animation to a RadDataBoundListBox without any success. What am I missing here?

    <telerikPrimitives:RadDataBoundListBox
        Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3"
        ItemsSource="{Binding WorkDays}"
        DataContext="{Binding Source={StaticResource Locator}, Path=WorkDay, Mode=OneWay}"
        ItemAnimationMode="PlayAll">
         
        <telerikPrimitives:RadDataBoundListBox.ItemAddedAnimation>
            <telerik:RadMoveAnimation StartPoint="500,0" EndPoint="0,0" Duration="0:0:1">
                <telerik:RadMoveAnimation.Easing>
                    <CubicEase EasingMode="EaseInOut"></CubicEase>
                </telerik:RadMoveAnimation.Easing>
            </telerik:RadMoveAnimation>
        </telerikPrimitives:RadDataBoundListBox.ItemAddedAnimation>
        <telerikPrimitives:RadDataBoundListBox.ItemRemovedAnimation>
            <telerik:RadMoveAnimation StartPoint="0,0" EndPoint="500,0" Duration="0:0:1">
                <telerik:RadMoveAnimation.Easing>
                    <CubicEase EasingMode="EaseInOut"></CubicEase>
                </telerik:RadMoveAnimation.Easing>
            </telerik:RadMoveAnimation>
        </telerikPrimitives:RadDataBoundListBox.ItemRemovedAnimation>
         
        <telerikPrimitives:RadDataBoundListBox.ItemTemplate>
            <DataTemplate>
                <Grid>
                    <Grid x:Name="ListBoxWorkDaysItem"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Top"
                          Background="{StaticResource TsColorVariant3}"
                          Margin="0,0,0,2"
                          d:DataContext="{d:DesignInstance model:WorkDay}">
                        ...
                    </Grid>
                </Grid>
            </DataTemplate>
        </telerikPrimitives:RadDataBoundListBox.ItemTemplate>
    </telerikPrimitives:RadDataBoundListBox>

    I'm using VS 2013 Ultimate Update 2 with Telerik UI for WP 2014.1 0226 on a new WP8.1 Silverlight project.

    Regards,
    Stephan
  2. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 22 May 2014 Link to this post

    Hello Stephan,

    I have taken a look at our code and have identifies a potential problem that causes this behaviour on your side.

    The reason for it is that when the source from the binding comes, an animation start is attempted but the values for the Added/Removed animations are not yet initialized by the XAML parser. We just need to refactor our code to not check for these values at this point and this will fix the issue.

    For the time being, I can suggest a workaround to programmatically bind the control to a data source to be able to see the animations.

    I hope this is helpful.

    Regards,
    Deyan
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
Back to Top