首先,如果 看代码

<TextBlock Text={Binding Path=sss,Converter={StaticResource wwww},ConverterParameter=dddd}>

假如,在后台代码中,改变了ddd的值,是不会调用wwww的。

实现思路:

使用MultiBinding解决

把sss,ddd,封装到一个对象中,实现INoticefyPropertyChanged接口

   <TextBlock  Foreground="White" Background="Transparent" MinWidth="35" HorizontalAlignment="Center">
                                             <TextBlock.Text>
                                                <MultiBinding Converter="{StaticResource wwww1}">
                                                    <Binding Path="sss"/>
                                                    <Binding Path="dddd"/>
                                                </MultiBinding>
                                             </TextBlock.Text>
                                        </TextBlock> 

相关文章:

  • 2021-05-14
  • 2021-09-30
  • 2022-12-23
  • 2022-12-23
  • 2021-04-25
  • 2022-12-23
  • 2021-10-01
  • 2021-09-08
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-03-04
  • 2021-06-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案