简体   繁体   中英

Set NotifyOnSourceUpdate for Image in code behind

Is it possible to set NotifyOnSourceUpdate property in code behind for Image in WPF ? I need to do this in code behind. I can't use: MSDN

If the Binding has already been set in Xaml or code you cannot change the Binding properties, but you can just create and assign a new binding to your Image

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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