0

I am working on WPF application and have a progress bar for each item inside a ListBox, but when I am binding it to some value its not updating the UI. If I set a specific int value like 45, UI gets updated. Why it is not binding to the value?

1 Answers1

0

Every ListBoxItem has his own DataContext (not the same as the view). If SawStatus is a property of your viewmodel, you have to change your binding to something like

Value ="{Binding DataContext.SawStatus, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox }"

Otherwise you have to give more details about the ItmesSource of your ListBox.

ManDani
  • 182
  • 4
  • 16