【问题标题】:Cannot find governing FrameworkElement to DiscreteBooleanKeyFrame找不到管理 FrameworkElement 到 DiscreteBooleanKeyFrame
【发布时间】:2013-08-17 12:25:45
【问题描述】:

我尝试将DiscreteBooleanKeyFrame的值绑定到文本框的HasError

<DiscreteBooleanKeyFrame KeyTime="0" Value="{Binding ElementName=TextBox1,Path=Validation.HasError}"/>

它不起作用。

我检查了输出并看到以下错误:

找不到管理 FrameworkElement 或 FrameworkContentElement 的 目标元素。 BindingExpression:Path=Validation.HasError; 数据项=空;目标元素是'DiscreteBooleanKeyFrame' (哈希码=xxxxx);目标属性是“值”(类型“布尔”)

有人知道为什么会出现这个错误吗?

【问题讨论】:

    标签: wpf binding state frameworkelement


    【解决方案1】:

    发生是因为关键帧是不在任何树中的抽象对象。

    如果我没记错的话,你也不能绑定动画。

    【讨论】:

      猜你喜欢
      • 2020-02-10
      • 2013-03-24
      • 2014-02-03
      • 2021-08-22
      • 2011-12-17
      • 2016-06-02
      • 2013-08-22
      • 1970-01-01
      相关资源
      最近更新 更多