View Issue Details

IDProjectCategoryView StatusLast Update
0001735NoesisGUIC# SDKpublic2020-07-01 12:18
Reporterai_enabled Assigned Tosfernandez  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.0.1 
Target Version3.0.3Fixed in Version3.0.3 
Summary0001735: Multibinding issues
DescriptionHi guys,

two issues:
1. the Converter property defined for Binding cannot locate the converter with a static reference.
2. Multibinding Converter doesn't work

For issue 1 the error is: "StaticResource 'PositiveNumberToBooleanConverter' not found."
It should not be a problem as it's actually defined. I've tried to define it closer but still the same issue. (Also, apparently no issue with Converter property for MultiBinding)

For issue 2 the error is: "Can't set 'null' on property 'Control.Visibility' of type 'Visibility'."

Regards!
Steps To ReproduceHere is the code:
<Control>
    <Control.Visibility>
        <MultiBinding Converter="{StaticResource BoolToVisibilityConverter}">
            <Binding Path="EffectsToAdd.Length" Converter="{StaticResource PositiveNumberToBooleanConverter}" />
            <Binding Path="EffectsToRemove.Length" Converter="{StaticResource PositiveNumberToBooleanConverter}" />
        </MultiBinding>
    </Control.Visibility>
</Control>

I've also tried a simpler code (HasEffectsToAdd and HasEffectsToRemove are both boolean properties from the view model):
<Control>
    <Control.Visibility>
        <MultiBinding Converter="{StaticResource BoolToVisibilityConverter}">
            <Binding Path="HasEffectsToAdd" />
            <Binding Path="HasEffectsToRemove" />
        </MultiBinding>
    </Control.Visibility>
</Control>

but have exactly the same issue with Multibinding ("Can't set 'null' on property 'Control.Visibility' of type 'Visibility'.") — I've checked and BoolToVisibilityConverter was not even called.
TagsNo tags attached.
PlatformAny

Activities

sfernandez

sfernandez

2020-06-30 18:46

manager   ~0006479

I was able to reproduce the problem with StaticResource for inner Bindings, we'll fix it for the next release.

About the other test that uses simple Bindings, how are you defining the BoolToVisibilityConverter?
Because a MultiBinding requires an IMultiValueConverter, and default BoolToVisibilityConverter just implements IValueConverter, you'll need another converter.

I verified that MultiBinding with a IMultiValueConverter works as expected in C#/Unity.
ai_enabled

ai_enabled

2020-06-30 18:55

updater   ~0006480

Thanks for fixing this!

Indeed, I was not using a IMultiValueConverter. Surprisingly, I was not even aware this is required :-) WPF is odd, probably they should have named the property for MultiBinding as MultiConverter instead of Converter...

Regards!

Issue History

Date Modified Username Field Change
2020-06-24 03:55 ai_enabled New Issue
2020-06-24 03:56 ai_enabled Steps to Reproduce Updated
2020-06-24 03:56 ai_enabled Steps to Reproduce Updated
2020-06-24 17:49 sfernandez Assigned To => sfernandez
2020-06-24 17:49 sfernandez Status new => assigned
2020-06-24 17:49 sfernandez Target Version => 3.0.3
2020-06-30 18:46 sfernandez Status assigned => feedback
2020-06-30 18:46 sfernandez Note Added: 0006479
2020-06-30 18:55 ai_enabled Note Added: 0006480
2020-06-30 18:55 ai_enabled Status feedback => assigned
2020-07-01 12:18 sfernandez Status assigned => resolved
2020-07-01 12:18 sfernandez Resolution open => fixed
2020-07-01 12:18 sfernandez Fixed in Version => 3.0.3