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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
V2EX
小众软件
小众软件
MongoDB | Blog
MongoDB | Blog
Jina AI
Jina AI
G
Google Developers Blog
H
Help Net Security
Microsoft Azure Blog
Microsoft Azure Blog
月光博客
月光博客
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
爱范儿
爱范儿
B
Blog
云风的 BLOG
云风的 BLOG
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
博客园 - 叶小钗
aimingoo的专栏
aimingoo的专栏
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
有赞技术团队
有赞技术团队
博客园_首页
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence

博客园 - 颜昌钢

怎样做好一个项目经理? 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>