<ProgressBar Foreground="Red"
Background="Transparent"
Value="{Binding NumFailed, Mode=OneWay}"
Minimum="0"
Maximum="{Binding NumTubes, Mode=OneWay, Converter={x:Static wpftools:DebuggingConverter.Instance}, ConverterParameter=Failedprogressbar}"
FlowDirection="RightToLeft"
Style="{DynamicResource {x:Static wpftools:CustomResources.StyleProgressBarVistaKey}}" />
This is what my progress bar looks like. The style came from http://mattserbinski.com/blog/look-and-feel-progressbar , and DebuggingConverter is a contactless converter that prints the value, type and parameter for the Console. I checked that the converter for Maximum is called when the NumTubes property changes.
Basically, the ProgressBar will not be redrawn until the value changes. So, if I have 2 tubes and 1, this will fail, even if I add another 20 tubes, the panel will still be half full until NumFailed changes, then this proportion will be updated. I tried to add false notifications about the NumFailed property, but this does not seem to work as the value has not changed.
Ideas?
source
share