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

  • Home
  • SEARCH
  • 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 413025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:08:36+00:00 2026-05-12T18:08:36+00:00

Up to now when I wanted to update an UI control from a non

  • 0

Up to now when I wanted to update an UI control from a non UI thread I used syntax like:

Dispatcher.Invoke(DispatcherPriority.Normal,
                  new Action(()=>Label1.Content="New Content"));

Now I am reading some more about it I keep finding the following syntax:

Label1.Dispatcher.Invoke(//same arguments;

Is the latter better? Why would I chose one method over the other?

  • 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-12T18:08:36+00:00Added an answer on May 12, 2026 at 6:08 pm

    I would personally use the one for the control itself, as then you don’t need to worry about even knowing the containing window.

    However, I wouldn’t expect it to matter – at least in normal Win32, all the controls within a single window ought to be “owned” by a single UI thread. I would expect that to carry over to WPF too. (There are some cases where this doesn’t apply, when one window is reparented in another, but that’s pretty rare.)

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

Sidebar

Related Questions

Up until now we used Ant in my company. Whenever we wanted to send
I recently installed Eclipse 3.7 (Indigo) and now a wanted to start a new
I'm using clearcase as version control. Now I have a requirement to update the
I am currently learning the zsh and now I wanted to use strftime but
The cassandra database seems to be very fast, now I wanted to use it
I wrote an application which uses spring framework. now i wanted to write a
I've created small database under SQL Server 2008 . Now i wanted to move
I put a TCP server and client code in PIC controller. Now just wanted
Something I've wanted to learn for quite a time now, but haven't been able
I've had my socket class working for a while now, but I wanted to

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.