Search code examples
wpfprismstatusbar

More than one "status item" in Statusbar


I want to manage more than one status in the statusbar. I thought about to binding StatusbarItems to the statusbar:


| Status1 =======80% | Status3 ==== 40% | Status2 ======= 99%| |


If one StatusbarItem reaches 100 %, it should be kicked out of the bar.

How to manage the status values?


Solution

  • Just have an ObservableCollection<StatusItem>.

    StatusItem is a class that represents each status you want to display, and contains appropriate members that implement INotifyPropertyChanged. Then you can simply create a data template for a StatusItem that binds to the percent complete value and it will automatically get updated.