This is a migrated thread and some comments may be shown as answers.

RadMoveAnimation on Listbox item?

2 Answers 39 Views
Animation
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Pooja
Top achievements
Rank 1
Pooja asked on 22 Aug 2014, 09:58 AM
Hello,

Would like to apply RadMoveAnimation on individual ListBox' item when tapped. Can some one guide me how to do this?

I am having a ListBox of images in a grid like structure. When any image gets tapped, it should move downwards (out of the screen)  pretending that the user has deleted the image out of the collection.

Having following layout:
            <ListBox x:Name="lstMain" Grid.Row="1" SelectionChanged="lstMain_SelectionChanged">
                <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <toolkit:WrapPanel x:Name="wrapPanelMain" />
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid Margin="12" x:Name="gridMain"> 
                            <Border BorderBrush="Red" BorderThickness="2">
                                <Image Source="/SampleProject;component/App.png" Height="62" Width="62"/>
                            </Border>
                            <Image Source="/SampleProject;component/Assets/cross.png" Height="62" Width="62"/>
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox> 

Would like to move the grid item named as "gridMain" when tapped on it. 

Please suggest something.

Thanks.







2 Answers, 1 is accepted

Sort by
0
Rosy Topchiyska
Telerik team
answered on 27 Aug 2014, 08:48 AM
Hello Pooja,

Thank you for contacting us.

First you will have to get the selected item's container on which you can play the animation; you can see how in this thread:
http://stackoverflow.com/questions/9190200/how-do-i-get-access-to-the-item-in-a-listbox-that-is-being-rendered-rather-than
Here is an article from our online documentation where you can find information about how to play animations on UI elements: Animation Manager

I have attached a sample application for demonstration.

I hope this helps.

Regards,
Rosy Topchiyska
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.

 
0
coni
Top achievements
Rank 1
answered on 07 Sep 2014, 08:06 AM
thanks you for Your help, i have same problems.

Regards,

Keboemen
Tags
Animation
Asked by
Pooja
Top achievements
Rank 1
Answers by
Rosy Topchiyska
Telerik team
coni
Top achievements
Rank 1
Share this question
or