Note that there are some explanatory texts on larger screens.

plurals
  1. PORemove ObservableCollection item with an animation
    primarykey
    data
    text
    <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/4171829/how-can-i-implement-fading-in-and-out-of-added-removed-listitems">How can I implement fading in and out of Added/Removed ListItems</a> </p> </blockquote> <p>I tried <code>LayoutStates</code> and <code>FrameworkElement.Unloaded</code> to do an animation when I remove my item, but it doesn't work. </p> <p>I think the item is removed before executing the animation! </p> <p>Does anyone know a solution?</p> <pre><code>&lt;EventTrigger RoutedEvent="FrameworkElement.Unloaded"&gt; &lt;BeginStoryboard&gt; &lt;Storyboard&gt; &lt;DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="grid"&gt; &lt;EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0.6"/&gt; &lt;EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="1.6"/&gt; &lt;EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="0"/&gt; &lt;/DoubleAnimationUsingKeyFrames&gt; &lt;DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="grid"&gt; &lt;EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0.6"/&gt; &lt;EasingDoubleKeyFrame KeyTime="0:0:0.6" Value="1.6"/&gt; &lt;EasingDoubleKeyFrame KeyTime="0:0:0.7" Value="0"/&gt; &lt;/DoubleAnimationUsingKeyFrames&gt; &lt;/Storyboard&gt; &lt;/BeginStoryboard&gt; &lt;/EventTrigger&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload