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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:53:14+00:00 2026-05-16T06:53:14+00:00

I am trying to figure this out, given the following code, does the Refresh()

  • 0

I am trying to figure this out, given the following code, does the Refresh() need to occur on the UI thread? It seems to work, and I am wondering if the CollectionViewSource is actually a thread-aware / safe object? It definately has properties and methods to support calling on the correct thread, just not sure if that is left up to the developer, or if this is accomplished within the object?

public CollectionViewSource UserList { get; private set; }
    void setupCollections()
    {
        UserList = new CollectionViewSource();
        UserList.Source = searchProvider.UserResults;
        UserList.SortDescriptions.Add(new SortDescription("DisplayName", ListSortDirection.Ascending));
    }

Is this Thread safe in Silverlight???

void RefreshUserList()
    {
        UserList.View.Refresh();
    }

Or do you need to do something like this?

void RefreshUserList()
    {
        // Is This Required?
        UserList.Dispatcher.BeginInvoke(() =>
            {
                UserList.View.Refresh();
            });
        // Or MVVM-light Method
        DispatcherHelper.CheckBeginInvokeOnUI(() =>
            {
                UserList.View.Refresh();
            });
    }
  • 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-16T06:53:14+00:00Added an answer on May 16, 2026 at 6:53 am

    Per Microsoft’s Documentation on CollectionViewSource the CollectionViewSource object is not Thread-safe. It seems that this is not reported to be Thread-safe, even though it does seems to work in many situations.

    This may be because the method being called is actually on the View, not the CollectionViewSource. The View returns an ICollectionView interface – the details of the supporting class are not known, except that the CreateView() method creates this.

    I would suggest that we always consider this not thread-safe and dispatch it to the correct thread, although my testing of the View.Refresh() at least suggests that it is thread-safe.

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

Sidebar

Ask A Question

Stats

  • Questions 499k
  • Answers 499k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Depends of course on what kind of data you want… May 16, 2026 at 12:34 pm
  • Editorial Team
    Editorial Team added an answer One possibility is that your default Locale has different symbols… May 16, 2026 at 12:34 pm
  • Editorial Team
    Editorial Team added an answer You can generate the thumbnails from the Image class in… May 16, 2026 at 12:34 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm trying to figure out a Java regex problem that I'm having. This is
I'm trying to figure out how to do this. Essentially I have points A
So I'm trying to figure out why the modulo operator is returning such a
I was dealing with hibernate, trying to figure out the run-time class behind proxied
I have a client/server question that i am trying to figure out the best
The following block of code works fine (no errors) $query = select * from
This behavior is so bizarre that I don't even know how best to ask
I am trying to create a utility in C# using the MVC framework where
I've been banging my head on this one for a while and I figured
Does anyone know how Eclipse determines which projects are in a particular workspace? 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.