Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7029801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:35:09+00:00 2026-05-28T00:35:09+00:00

I am making a top notification animation, but I don’t know how to make

  • 0

I am making a top notification animation, but I don’t know how to make the animation synchronous until the animation finishes. Here is the code I have:

public Storyboard prepareShowStory(int count, NotificationControl notifyControl)
        {
            notifyControl.textBlock1.Text = "Got" + count.ToString() + "Message";

            notifyControl.RenderTransform = new CompositeTransform();
            Storyboard story = new Storyboard();
           //From here until the annimation finish and remove LayoutRoot.Resources.Clear();
            LayoutRoot.Resources.Add("unique_id", story);

            story.Completed += (object sender, EventArgs e) =>
            {
                story.Stop();
                story.Children.Clear();
                App.ViewModel.myAction -= CompletedRefresh;
                LayoutRoot.Resources.Clear();
                 //To here.
            };
            story.Begin();

            DoubleAnimation animation;
            animation = new DoubleAnimation();
            animation.AutoReverse = true;
            animation.From = -64;
            animation.To = 60;
            animation.Duration = new Duration(TimeSpan.FromMilliseconds(1600));
            animation.EasingFunction = _EasingFunction;
            Storyboard.SetTargetName(animation, notifyControl.Name);
            Storyboard.SetTargetProperty(animation, new PropertyPath("(UIElement.RenderTransform).(CompositeTransform.TranslateY)"));
            story.Children.Add(animation);

            return story;
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:35:10+00:00Added an answer on May 28, 2026 at 12:35 am

    You could check the ResourceDictionary before adding to it.

    if(!LayoutRoot.Resources.Contains("unique_id"))
       LayoutRoot.Resources.Add("unique_id", story);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app here I made for a client, but sometimes he doesn't
I am making a Gui Library on top of SDL using C++. (Don't ask
I am making a movement engine for my top-down 2D game, but I got
I'm making animation of moving window on desktop. I have found somewhere info that
What's the reason of making top-level class non-public in Java? Let's say we have
I am making a top down, rpg-type game - similar to Pokemon, but I
I am making an FAQ page and have buttons across the top to jump
I am making an algorithm builder and have a main text box on top,
I'm making a mobile web app. At the top of the page, I have
Making my first steps with NHibernate, I'm trying to have it creating my Tables

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.