Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

{0} is not valid for Setter.Value. The only supported MarkupExtension types are DynamicResourceExtension and BindingBase or derived types

I've got a XAML issue, in a project where working on vs2010 we use our own CustomBinding when using DynamicResource in my XAML the Designer throws me the following expception :

CustomBinding is not valid for Setter.Value. The only supported MarkupExtension types are DynamicResourceExtension and BindingBase or derived types.

even though it's not in use in that particular extension.

<SomeControl Value="{CustomBinding SomeValue} Style="{DynamicResource SomeStyle}"/>

Style="{DynamicResource SomeStyle}" is the part which throws the design time exception and the style is never set as a result.

If any one came across a similar issue, please advise.

like image 803
eran otzap Avatar asked Oct 14 '12 09:10

eran otzap


1 Answers

Setter.Value used in your Style only support some hardcoded classes (StaticResource, DynamicResource and BindingBase) because providing of a value has to be deferred to the point when Styles are applied and it seems they had not enough time to implement it properly so they check for the supported classes and apply them later.

like image 104
Firo Avatar answered Sep 22 '22 03:09

Firo