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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:41:54+00:00 2026-06-04T18:41:54+00:00

My reactive extension skills are weak and stretched thin. Here is the situation: In

  • 0

My reactive extension skills are weak and stretched thin. Here is the situation:

  1. In my MVVM I have ObservableCollection which binds to my Xaml listbox. That’s normal stuff.

    public ObservableCollection<IExtractedFileInfo> ExtractedFileInfoList 
    
  2. In my business layer I have a long running process that queries my EntityFramework and is called with a signature something like

    IList<IExtractedFileInfo> ExtractedFileInfoListFetch(string location)
    

My usual solution to passing the results to the listbox would be to get the output from the long running process, create a new ObservableCollection, and set it equal to the property in my MVVM like this

        var extractedFileInfoList = _businessFacade.ExtractedFileInfoListFetch(location);
        ExtractedFileInfoList = new ObservableCollection<IExtractedFileInfo>(extractedFileInfoList);

Of course this plops the entire list of results into the Xaml listbox at the end of the process. I would like to implement this process so the Xaml listbox fills as the ReactiveExtensions pull in each IExtractedFileInfo object. I just cannot find any examples of how to orchestrate this process. I’m confused by the separation between the layers and how to get them to work together using ReactiveExtension. I think I can write the query in my business layer, but how do I get the results to transfer up to the MVVM and showup on my Display thread? Do I pass the ObservableCollection property from my MVVM down to my business layer and have it populated there? Or, do I pull all my queries up to the MVVM and run the whole process from there? As you can see, I’m going down for the third time.

  • 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-06-04T18:41:55+00:00Added an answer on June 4, 2026 at 6:41 pm

    Your service layer can expose an IObservable<IExtractedFileInfo>. Your view model would then subscribe to that and push any items it receives into an ObservableCollection<IExtractedFileInfo> (to which your view is bound). Of course, it will need to subscribe on the UI thread.

    Your service layer then has no need to hold onto items as they are received, and your VM is free to use all the goodness of reactive extensions to do things like batch items together or delay their application.

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

Sidebar

Related Questions

I have a IObservable [named rows in the sample below] from Reactive extensions framework
There's a nice F# workflow builder for Rx here: http://blogs.msdn.com/b/dsyme/archive/2011/05/30/nice-f-syntax-for-rx-reactive-extensions.aspx I've been trying to
I'm looking for the function in reactive-banana that will choose from which event stream
I am learning RX (Reactive Extensions), and have found someone posted some code nearly
I have a C# service application which interacts with a database. It was recently
How many times is Reactive Extensions supposed to evaluate its various operators? I have
Recently I noticed a small bug in my code which uses Reactive Extensions. I
I'm currently trying to get to know FRP through Heinrich Apfelmus' reactive-banana , which
I'm a Reactive Extension beginner. Gideon Engelberth gave me excellent answer about Reactive Extension
I have been building a personal website using the skeleton reactive page model .

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.