Since the storyboard is asynchronous, you need to add the "Storyboard Completed" event handler:
story.Completed += new EventHandler(Story_Completed);
then put the Remove code in this:
private void Story_Completed(object sender, EventArgs e) { if (one.Opacity == 0) { Container_one.Children.Remove(one); } }
This will be done after the storyboard is completed.
source share