gpt4 book ai didi

BindingExpression 的 Silverlight UpdateTarget() 解决方法

转载 作者:行者123 更新时间:2023-12-04 18:15:59 25 4
gpt4 key购买 nike

谁能建议一种在 Silverlight 中为 WPF 中存在的 UpdateTarget() 方法创建解决方法的方法?删除 DP 上存在的现有绑定(bind)并手动设置值对我来说不是一个选项。谢谢

最佳答案

尝试这样的事情。将 ImageBlobMember 替换为 XAML 控件的 x:Name/Name,并将 Image.SourceProperty 替换为适当的值,具体取决于控件的类型。

BindingExpression bindExp =
ImageBlobMember.GetBindingExpression(System.Windows.Controls.Image.SourceProperty);
Binding bind = bindExp.ParentBinding;
ImageBlobMember.SetBinding(System.Windows.Controls.Image.SourceProperty, bind);

关于BindingExpression 的 Silverlight UpdateTarget() 解决方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3406893/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com