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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:59:30+00:00 2026-05-26T11:59:30+00:00

I perform a lengthy operation (connection test, validation of remote DB tables, etc.) in

  • 0

I perform a lengthy operation (connection test, validation of remote DB tables, etc.) in a separate thread in a WPF app. During the testing, I collect information for the user about which tests were passed and which weren’t. The information is stored as a List<T> of objects of my own design:

public class StatusItem : DependencyObject
{
    public string Text { get... set... }
    public Status Status { get... set... }
    public string Details { get... set... }
}

All these properties are a front for their corresponding DependencyProperty. When the operation is completed (in the separate thread), I set the collected info, status, to a private field on my Window. I get a:

InvalidOperationException:
The calling thread cannot access this object because a different thread owns it.

Is there a way for me to transfer status (a List<StatusItem>) from TestThread to my main thread without having to resort to delegates and Dispatcher invokes?

PS: I could do Invoke, but I’d rather avoid having to create a CopyStatusItemsDelegate delegate.

  • 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-26T11:59:31+00:00Added an answer on May 26, 2026 at 11:59 am

    I don’t think there is a nice solution. The above situation is the reason, why I don’t derive Item-ViewModels from DependencyObject but implement INotifiyPropertyChanged.

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

Sidebar

Related Questions

We have a lengthy database operation. When we perform this operation with enlist =
In my user control I perform a lengthy operation. In order to prevent users
I have a console app that performs a lengthy process. I am printing out
I'm trying perform a relatively basic TCP socket send/receive operation on Windows CE using
I'm trying to perform an inline operation where I need to sort a list
I am using the following code to perform drag operation on NSTextView object. -
I was wondering if it were possible to perform an operation on every element
I am trying to perform a swap deployment operation, in C#, on a hosted
I'm building an android app which should perform a GET on my site to
I'm trying to perform an operation on each character of a string which is

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.