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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:38:41+00:00 2026-05-15T02:38:41+00:00

I have an application that consists of a WPF UI with an infrastructure layer

  • 0

I have an application that consists of a WPF UI with an “infrastructure” layer below it that has some references to various services with data. I’ve got a class, Updater, that has a couple properties that represent the data to be consumed by the UI layer. This updater has a Systems.Timer function such that every minute or so, it makes synchronous calls to the service and updates those aforementioned properties with a “refresh” of the data.

I’d like to raise an event from this class that the UI can be notified of the changes when it completes. When i did something akin to this previously, it was throwing exceptions right and left because the thread that fired the event was different (because it came from the timer elapsed event) then the thread the object was created on.

The crappy solution i’m using right now is to have another timer on the UI layer but…yuck.

What’s the best way to notify the UI that the Updater class is all done with it’s work?

  • 1 1 Answer
  • 1 View
  • 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-15T02:38:41+00:00Added an answer on May 15, 2026 at 2:38 am

    Those cross-thread exceptions can be solved by updating the UI through the Dispatcher.Invoke function. The Dispatcher is an object that can be used to call onto the UI thread. Give this article a thorough read and you should be all set.

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

Sidebar

Related Questions

Suppose you have an application that consists of two layers: A: A data layer
I have an application that consists of two forms. One form displays data returned
I have a server application that consists of multiple OSGi bundles, some mine, some
I have an x86 Windows application that consists of a couple of services and
WPF can be infuriating sometimes. I have a fairly simple application that consists of
I have an application that consists of multiple python scripts. Some of these scripts
I have an application that consists of two processes (let's call them A and
I have a solution that is deployed using ClickOnce. It consists of an application,
I have an application that consists of a login, 3 tables, and then an
I have an application that consists of numerous systems using UDP clients in remote

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.