Alex141 / CalcBinding

Advanced WPF Binding which supports expressions in Path property and other features
Apache License 2.0
638 stars 79 forks source link

Fixed ArgumentException when used in Setter.Value #64

Closed taks closed 4 years ago

taks commented 4 years ago

same as #46, but I change the text and commit message to English.

When used inside a Setter.Value (as follows), ArgumentException occurs in Visual Studio design mode.

<Style TargetType="ComboBox" >
  <Setter Property="IsEnabled" Value="{c:Binding 1>1}" />
</Style>

The error message is 'Binding' is not valid for Setter.Value. The only supported MarkupExtension types are DynamicResourceExtension and BindingBase or derived types.

By inheriting DynamicResourceExtension, the error will disappear.

taks commented 4 years ago

When I made this change in my project, System.ArgumentNullException: 'Key cannot be null. was thrown.

Since there is no solution, I will cancel this PR.