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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:17:59+00:00 2026-05-28T06:17:59+00:00

In WPF4 Unleashed Adam Nathan states: Most WPF classes derive from DispatcherObject and are

  • 0

In WPF4 Unleashed Adam Nathan states:

Most WPF classes derive from DispatcherObject and are therefore
inherently thread-unsafe.

Professional WPF Programming claims the opposite:

DispatcherObject is the lowest level class in the framework hierarchy,
and because almost all objects inherit from it, most objects are
inherently thread-safe

MSDN on DispatcherObject:

Only the thread that the Dispatcher was created on may access the
DispatcherObject directly. To access a DispatcherObject from a thread
other than the thread the DispatcherObject was created on, call Invoke
or BeginInvoke on the Dispatcher the DispatcherObject is associated
with.

Based on MSDN description it looks like WPF4 Unleashed quote was either a typo or Nathan was just wrong and the Professional WPF Programming authors were right…

Anyway, are classes inheriting from DispatcherObject inherently thread-safe or inherently thread-unsafe?

EDIT:

MSDN also states:

Subclasses of DispatcherObject that need to enforce thread safety can
do so by calling VerifyAccess on all public methods. This guarantees
the calling thread is the thread that the DispatcherObject was created
on.

This indirectly confirms that WPF4 Unleashed claim was accurate after all…

  • 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-28T06:17:59+00:00Added an answer on May 28, 2026 at 6:17 am

    It depends what you mean by thread-safe, but I’d favour the view of WPF4 Unleashed – based on the MSDN description.

    The documentation says that you can only access members of the DispatcherObject on a particular thread – so it’s unsafe to use it from arbitrary threads. That sounds like it’s a thread-unsafe type to me.

    On the other hand, you could consider that if a DispatcherObject is used correctly, the code within the class doesn’t have to take thread safety into account, as it should only be invoked from a single thread.

    So in some sense it’s “thread-unsafe from the outside, thread-safe from the inside”. I would prefer to use a term which is more descriptive: the classes have thread affinity.

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

Sidebar

Related Questions

As is well-known, WPF still doesn't supply a folder selection dialog (unless WPF4 has
I am developing a WPF4 app and using DataSet to populate a xamDataGrid (from
I'm using an AutoCompleteBox from the WPF Toolkit inside a DataGridTemplateColumn's editing template in
Possible Duplicate: WPF4 DataGridHeaderBorder in a xaml Style I found some styles for WPF
I'm trying to disassemble some of the DLL of the new WPF4 Beta2 framework.
I've got WPF 4 app that has a number of UserControls that share styles
Can anyone suggest a guideline on when to use SnapsToDevicePixels in WPF 4.0? Should
Now that there is an official MS DatePicker in WPF4, I was wondering if
Have Microsoft Chart Controls been integrated into .NET 4 release of WPF? I've found
I'm working on a WPF TabControl whose last item is always a button 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.