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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:31:07+00:00 2026-05-26T15:31:07+00:00

I have a window (Windows form ) where i have two WPF user controls

  • 0

I have a window (Windows form ) where i have two WPF user controls apart from other controls.

One user control has list of items (names) with available checkbox along side.
Other one has a description of the items (Some pictures and other details).

Both user controls have their view models

The user can select and unselect checkboxes in the first user control. Based on his selection, the items details gets added/removed to the 2nd user control.

We are getting all data from the database. So initally to populate we retreive the data from database. We also store the select/unselect of the user back to database. The 2nd user control also needs to refresh data from database. We donot store anything on memory.

What needs to happen is that when user selects/unselects in first usercontrol, it should get added into the 2nd user control.
So the operation are : Save or delete selection into database –> Send a request to 2nd user control to refresh it’s collection reading the data from database.

I am using the Dispatcher object of the first usercontrol (invoked from a eventhandler in 1st user control view model) and invoking a method on Parent Form (the Windows container form). This parent form then invokes the refresh of the 2nd user control view model that refreshes the 2nd user control.

The problem is that the UI of the 1st user control freezes till this whole process is completed. What i want instead is that the UI of 1st user control not to freeze. The reason is that the UI of 1st control need not wait for operation in 2nd user control to be updated. The 2nd View refresh can be queued.

So basically what i want is when user selects/unselect checkboxes is just send the notification (for refresh of 2nd user control) and continue with my user control and not wait.

I tried Background worker but nothing seems to work.

Any help is appreciated.

  • Girija
  • 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-26T15:31:08+00:00Added an answer on May 26, 2026 at 3:31 pm

    if you are able to create a ViewModel instance that is used by both Views, You can probably avoid having to do any of the notification coding.

    If you need to keep the VM’s seperate, then if you have some sort of event mechanism in your code will do the trick.
    For instance if you are using Unity, the EventAggregator can be used to do the notification, this will bypass the parent form and your second viewmodel should be able to refresh itself without having to be on the GUI thread.

    A quick, but unlikely to work thing to try is ( I say unlikely because i havent been able to get any performance benefits from it )

    using (Dispatcher.CurrentDispatcher.DisableProcessing())
    {
    //notification code here
    }
    

    And of course, if your second viewModel is grabbing data from somewhere, make sure it is async.

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

Sidebar

Related Questions

I have two listbox in windows Form c#, the first one has all valid
I have two window form applications written in C, one holds a struct consisting
I have created two forms in my Windows Application. One Form acts as a
I have window form in my WPF Application when I open new window from
I have two windows in my WPF app: a login window and an options
I have a Windows Form with two list boxes on it. Also there is
I have a windows form that has two DataGridViews (DGVs) that will hold 25,000+
I am creating a WPF form. One of the requirements is that it have
Im using c# .net windows form application. I have two comboboxes A and B
I have a Windows Form and a class with two simple methods that run

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.