So I have an object that implements INotifyPropertyChanged, and I have a property that when it changes, it call the PropertyChanged event all right, but when I use a converter like this:
        <Image Grid.Column="0">
            <Image.Source>
                <Binding Path="IsInstrumentStatusOk" UpdateSourceTrigger="PropertyChanged">
                    <Binding.Converter>
                        <converters:BooleanToImageConverter 
                            ImagePathIfFalse="/Images/InstrumentStatusBar/Instrument_Status_Alarm.png"
                            ImagePathIfTrue="/Images/InstrumentStatusBar/Instrument_Status_OK.png" />
                    </Binding.Converter>
                </Binding>
            </Image.Source>
        </Image>
For some reason it doesn't u开发者_运维问答pdate it, and it doesn't call the converter. If I use it like normally
Source="{Binding MyProperty, Converter={StaticResource MyConverter}}"
It works, but I don't want to use it like that because I have a bunch of converters that I want to use with different images. Any idea why it doesn't update?
Thanks.
You're setting UpdateSourceTrigger="PropertyChanged" in your XAML. This means when the target property changes the value should update back to the source. Obviously nothing is ever changing the Image::Source property. 
Just remove the UpdateSourceTrigger setting altogether and you should be fine.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论