繁体   English   中英

在后面的代码中为图像设置NotifyOnSourceUpdate

[英]Set NotifyOnSourceUpdate for Image in code behind

是否可以在WPF Image后面的代码中设置NotifyOnSourceUpdate属性? 我需要在后面的代码中执行此操作。 我不能使用: MSDN

如果Binding已在设定Xaml或代码,你不能改变的结合特性,但你可以创建并分配一个新的绑定到你的Image

 Binding binding = new Binding("MyImageProperty") { NotifyOnSourceUpdated = true };
 image.SetBinding(Image.SourceProperty, binding);

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM