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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:38:59+00:00 2026-05-24T10:38:59+00:00

I am a beginner with WPF, in my application I need to perform a

  • 0

I am a beginner with WPF, in my application I need to perform a series of Initialization steps, these take 10-15 seconds to complete during which my UI becomes unresponsive.

I was using yesterday the background worker but it didn’t update my window, in fact it was frozen. Not sure, but maybe it didn’t work because this control is only for Windows Forms.

UPDATE:

If not too much trouble, can you post me an example to use the alternative? For my case, the program will get some values from a database in a blucle.

  • 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-24T10:39:00+00:00Added an answer on May 24, 2026 at 10:39 am

    Dispatcher.
    The Dispatcher maintains a prioritized queue of work items for a specific thread. This might help you for updating your UI. If you have a lot of UI related initializations even this won’t be able to help you much.

    Dispatcher is not always an alternative to BackgroundWorker actually. The best practice is to select the more appropriate one as per your requirement. For example if you want something to execute without queuing BackgroundWorker is the solution. On the other hand if queuing is not a problem then Dispatcher is an alternative. For example, Dispatcher is using in Spell checkers and syntax highlighting functionality.

    WPF Thread Model

    All WPF applications start out with two important threads, one for
    rendering and one for managing the user interface. The rendering
    thread is a hidden thread that runs in the background, so the only
    thread that you ordinarily deal with is the UI thread. WPF requires
    that most of its objects be tied to the UI thread. This is known as
    thread affinity, meaning you can only use a WPF object on the thread
    on which it was created. Using it on other threads will cause a
    runtime exception to be thrown. Note that the WPF threading model
    interoperates well with Win32®-based APIs. This means that WPF can
    host or be hosted by any HWND-based API (Windows Forms, Visual Basic®,
    MFC, or even Win32).

    The thread affinity is handled by the Dispatcher
    class, a prioritized message loop for WPF applications. Typically your
    WPF projects have a single Dispatcher object (and therefore a single
    UI thread) that all user interface work is channeled through.

    NOTE :

    The main difference between the Dispatcher and other threading methods
    is that the Dispatcher is not actually multi-threaded. The Dispatcher
    governs the controls, which need a single thread to function properly;
    the BeginInvoke method of the Dispatcher queues events for later
    execution (depending on priority etc.), but still on the same thread.

    See this thread for more information.

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

Sidebar

Related Questions

I'm a beginner learning WPF, and need to create an Application Bar that launches
I'm a complete beginner at WPF. I've made a usercontrol labeledTextbox that holds a
I am beginner on WPF and need your help. Problem: I have 4 buttons
I'm a complete beginner in WPF and have an app that uses StoryBoard to
I am trying to implement a WPF MVVM application. And I am a beginner
How to profile a WPF application? I am a beginner C# developer, so I'm
I'm a complete beginner in WPF so this is probably very simple. The following
I´m actually programming a WPF-application. Now, I´m just a beginner in WPF and so
Complete beginner to Rails here: In Rails: I have a Model Post, which hasmany
Beginner help needed :) I am doign an example form a php book which

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.