I’m trying to bind a property, and I’m getting the most inexplicable error message.
Cannot convert the value in attribute 'To' to object of type ''
Yep, the destination type is an empty string.
This is brought on by this line:
<DoubleAnimation Storyboard.TargetProperty="Height"
To="{TemplateBinding MinHeight}" Duration="0:0:0.6"
FillBehavior="HoldEnd" AutoReverse="False"/>
I’m thoroughly perplexed. How can the destination type be… unspecified? If it can’t figure out the destination type, how can it even attempt to convert? How can it not know the destination type?
If I change it to a number, say, To="90", then it works fine. I guess it knows what type it’s supposed to be there.
Anyone have any insight?
I think I found a partial answer in this question.
A DoubleAnimation is not a FrameworkElement, thus binding is not supported. (I’ve seen that binding to a StaticResource will work, since it’s static, but non-static bindings will fail.)
So I think this may just be a wonky error message.
I’m marking this as the answer, but if anyone has a better one, please go ahead. I’ll gladly mark your answer as correct if it’s better than this one.