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 8842155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:53:34+00:00 2026-06-14T10:53:34+00:00

I currently have a Silverlight game in progress. At the moment there are several

  • 0

I currently have a Silverlight game in progress.

At the moment there are several rectangles each tied to a class which animate nicely on their own one at a time:

            foreach (Object O in Objects)
            {
        // Generate Random Number
                    Random rnd = new Random();
                    int r = rnd.Next(40);

                    // Move Object
                    O.Move
             }

The Move Method in Object handles all the animation including pauses using System.Threading.Thread.Sleep(10).

The problem is that at the moment Object A will move and stop then Object B will move and stop then Object C.

What is the best way to animate all objects at once?

The strategy that springs instantly to mind is to create a separate thread for each object but this seems a lot that can potentially go wrong.

I am using MVVM so all animation etc is handled out of the XAML.

  • 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-06-14T10:53:35+00:00Added an answer on June 14, 2026 at 10:53 am

    If your object is responsible for drawing itself on the screen, then each object should have its own thread. But only the UIThread should manipulate the GUI. Therefore, you should place the code outside your object in a super object (king of gameboard) which will tell all you object to compute their position, ask them to refresh and define if a pause must be done.

    If the UI is refreshed from one central point (one thread) , you should only use the Thread.Sleep when you computed the positions of all your objects and redraw the screen.

    Anyway, Thread.Sleep in your object is not really good.

    Serge

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We currently have a silverlight application (kind of a game) and we need to
I'm currently programming an application in Silverlight which need to have a control to
Are there any good C# Silverlight Graphics or Game engines currently? I am planning
Background Currently I have a C# Silverlight business application which uses RIA Services. The
Background Currently I have a C# Silverlight business application which uses RIA Services. The
Currently we have application in Silverlight which contains a dashboard. The dashboard was developed
I'm tinkering with Silverlight 2.0. I have some images, which I currently have a
I am currently working on a silverlight business application, so I have come across
I currently have a table of concentrations, which are linked to a table of
We currently have a XAP file which contains Foo.dll, and another XAP file (with

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.