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

Fading out items

3 Answers 131 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Jerome
Top achievements
Rank 1
Jerome asked on 29 Nov 2012, 07:22 PM
I've managed to get a RadTileViewItem to fade in when it's added to the TileView. That was easy of course, as the item exists, and I can just set it's opacity to 0 and move it up.

However, I also want to get an item to fade out. But, when the item is removed from the underlying collection, the RadTileViewItem is of course immediately removed, and so it's gone.

How can I accomplish this? 

3 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 04 Dec 2012, 04:26 PM
Hi Jerome,

Let me get straight to your question. As you (manually) remove the RadTileViewItems from your business collection you can add the "fade out" animation just before you delete the item. In order to this you can use a DispatcherTimer to decrease the opacity of the item to 0 and then you can delete it. Please take a look at the attached project and let me know if it works for you.

Regards,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jerome
Top achievements
Rank 1
answered on 04 Dec 2012, 05:23 PM
I don't have RadTileViewItems in my business collection. I have business objects. I'm trying to stay as MVVM as possible.
0
Pavel R. Pavlov
Telerik team
answered on 07 Dec 2012, 03:03 PM
Hi Jerome,

In your case you can create a property in your business data (e.g. MyOpacity) and bind it in two way mode to the Opacity property of the RadTileViewItem using a Style.Setter in XAML. I have implement the approach in the attached project. Please take a look at it and let me know if it works for you.

Kind regards,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TileView
Asked by
Jerome
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Jerome
Top achievements
Rank 1
Share this question
or