문제

I try to bind the value of DiscreteBooleanKeyFrame to HasError of textbox:

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

It does not work.

I checked the output and saw the following error:

Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Validation.HasError; DataItem=null; target element is 'DiscreteBooleanKeyFrame' (HashCode=xxxxx); target property is 'Value' (type 'Boolean')

Does anyone have any idea why this error occurs?

도움이 되었습니까?

해결책

Happens because key frames are abstract object that are not in any tree.

Also you cannot bind animations anyway if i remember correctly.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top