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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:15:04+00:00 2026-05-28T00:15:04+00:00

I fail to get back on the UI thread using Reactive Extentions and the

  • 0

I fail to get back on the UI thread using Reactive Extentions and the MVVM Light Toolkit.

I got the follow properties on a ViewModel:

    private ObservableCollection<Workspace> _workspaces;
    public ObservableCollection<Workspace> Workspaces
    {
        get
        {
            return _workspaces;
        }
        set
        {
            if (_workspaces == value)
                return;

            _workspaces = value;

            RaisePropertyChanged("WorkspacesLoaded");

        }
    }

    public bool WorkspacesLoaded
    {
        get
        {
            if (_workspaces != null && _workspaces.Count > 0)
                return true;

            return false;
        }
    }

Notice the RaisePropertyChanged("WorkspacesLoaded"); which never seems to arrive at the UI.

The following code subscribes to a Subject<Workspace> and from what I read the .ObserveOnDispatcher() should bring me back on the UI Thread.

        _workspaceSubscription = _workspaceSource.WorkspaceMutations
            .ObserveOnDispatcher()
            .SubscribeOn(Scheduler.ThreadPool)
            .Subscribe(OnNewWorkspaceMutation, OnWorkspaceMutationError);

        _workspaceSource.GetWorkspaces();

And this code adds to the Workspaces property:

    private void OnWorkspaceCreated(Workspace workspace)
    {
       Workspaces.Add(workspace);
    }

This is what baffles me: The Workspaces collection gets properly populated and the UI binds to it properly. However, when I set a breakpoint on the setter of Workspaces it never gets hit so my suspicion is that the Observable stream isn’t returned to the UI thread.

Any help would be highly appreciated.

  • 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-28T00:15:04+00:00Added an answer on May 28, 2026 at 12:15 am

    It’s because you add to the Workspaces collection, you don’t actually set the collection property again. If you have used

    Workspaces = new ObservableCollection<Workspace>();
    

    then the setting of the wokrspace property would have been triggered. Now it just uses the value that is already there. If you set a breakpoint in the getter it will be hit.

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

Sidebar

Related Questions

I'm trying to achieve two things, both of which I fail to get at.
Why does this code fail to display the category name Apples using the current
I have an issue with creating a transaction. I get an error back that
I am sending login status = fail, back to my login page.Here is my
i'm trying to get back a style property in all valid 'length' and 'percent'
I need to make a mysql connection and get some data back. I can
I'm trying to get the RSpec-tests of my Rails application back to work. As
I have an Asp.Net MVC 3 mobile web app and get requests fail with
Parsing HTML / JS codes to get info using PHP. www.asos.com/Asos/Little-Asos-Union-Jack-T-Shirt/Prod/pgeproduct.aspx?iid=1273626 Take a look
fail statement:Error: ORA-00979: not a GROUP BY expression select org_division.name , org_department.name , org_surveylog.division_code

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.