首先,如果 看代码

<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> 

posted on 2009-10-30 02:19  颜昌钢  阅读(12926)  评论(1编辑  收藏  举报