WPF:在 DependencyProperty.UnsetValue 上触发
在回答这个问题时,做出了以下声明
“理论上可能会......触发 {x:Static DependencyProperty.UnsetValue},这会更干净,但这在实践中似乎不起作用。”
有人有幸做到这一点吗?
in an answer to this question the following statement was made
"In theory it might be possible to .... trigger on {x:Static DependencyProperty.UnsetValue}, which would be much cleaner, but this doesn't appear to work in practice."
Has anybody had any luck in doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
失败的 Binding 将返回 null(或后备值),这与 UnsetValue 不同。
itowlson 给您的答案可能是您能得到的最好的答案。在这种特定情况下,您也许可以使用:
这实际上是相同的。
(您可能想看看这个)
A failing Binding will return null (or the fallbackvalue), which is different from an UnsetValue.
the answer itowlson gave you is probably the best you will get. In this specific case, you might be able to use:
which is practically the same.
(you might want to take a look into this)