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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:25:53+00:00 2026-05-18T12:25:53+00:00

In a MVVM WPF application, I have a master-detail View that is used to

  • 0

In a MVVM WPF application, I have a master-detail View that is used to manage Alarms. In the AlarmDetails View I have several properties that are set through ComboBox controls. One of those is the Alarm’s Source, and those sources can be changed in another View (SourcesView), thus changing the combobox content in the AlarmDetailsView.

The way the data flows is relatively straightforward

  1. A source is added to the collection in SourcesView
  2. A message is sent from SourcesView and is received by all AlarmDetailsViewModel
  3. The Sources collection in each AlarmDetailsViewModel is changed accordingly and since it is an ObservableCollection it notifies each binding targets of the change
  4. The AlarmDetailsView has its DataContext set to a selected AlarmDetailsViewModel, thus the ItemsSource property of its Sources ComboBox is updated (I see it using a dummy converter, in debug I can see the updated collection being passed to ItemsSource, and it contains the newly added item)
  5. After all this happened, when I navigate to the AlarmsView/AlarmDetailsView Tab, the items in the Sources ComboBox do not contain the new item.
  6. When I select a new Alarm in the master list and I select the original one back, the combobox displays the new item just fine (when i select an item in the master list, the DataContext property of the AlarmDetailsView gets updated).

I am at a loss with this, I have been poundering this for a while.

Anyone have an idea? Any debugging suggestions?

Thanks,

Alex

EDIT: The ComboBox that does not update is located within the AlarmDetailsView, which means that it is used to set a property of the Alarm object (its Source, namely). Hope this helps.

EDIT 2: In addition to the answer below, another solution was to use an ObservableCollection instead of a List. For some reason, raising a PropertyChange event on the List (as described above) triggered the ComboBox to refresh its ItemsSource, but not to add the new items to its drop-down. Using the ObservableCollection, there is not need to raise the propertychange event since it manages it all by itself.

  • 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-18T12:25:53+00:00Added an answer on May 18, 2026 at 12:25 pm

    ** EDIT **

    Ugly solution but worked for me if someone has a better solution please share 🙂

    Emptied the collection, notified the GUI, added the real collection notified to gui

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

Sidebar

Related Questions

I have a WPF application that mostly follows MVVM, which I am trying to
We're designing a WPF / MVVM application that allows the user to search and
I have a WPF application which is built on the MVVM design pattern. I
I'm working on my first true WPF MVVM pattern application. Currently I have a
I am writing an WPF MVVM application using Prism. A couple days ago I
I am trying to use MVVM in my WPF application which displays data from
I am using MVVM architecture to develop a WPF application... So far everything has
I'm working on an WPF application using the mvvm-light framework. I'm new to both
I'm doing my first WPF / MVVM application which is going to be installed
I have a question regarding the MVVM design for C#/WPF. I've had a look

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.