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