惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
Jina AI
Jina AI
宝玉的分享
宝玉的分享
人人都是产品经理
人人都是产品经理
D
DataBreaches.Net
V
V2EX
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
B
Blog
博客园 - 叶小钗
小众软件
小众软件
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
A
About on SuperTechFans
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog

博客园 - 颜昌钢

怎样做好一个项目经理? ICollection 与 IList 区别 oracle 数据库跨库查询方法 SetTimeOut 与 SetInterval 区别 - 颜昌钢 内存释放 机制 remoting 学习整理 wpf windows 放大缩小 疑问?? - 颜昌钢 GC 资源 回收 WPF中代码画箭头 方法参数 Ref 与 引用类型 DataTrigger 以及 EnterActions 和ExitActions 学习笔记 - 颜昌钢 WPF xaml文件中使用大括号{} - 颜昌钢 - 博客园 WPF下的地图解决方案 关于 项目 投标相关文档 服务器计时器、Windows 计时器和线程计时器 wpf小控件 集合 仪表盘等 wpf button 事件的触发顺序 - 颜昌钢 c# 插件 体系 一个类似于 splittercontainer 控件的控件
关于WPF的Binding 的 ConverterParameter 参数的动态设置
颜昌钢 · 2009-10-30 · via 博客园 - 颜昌钢

首先,如果 看代码

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