View Issue Details

IDProjectCategoryView StatusLast Update
0001940NoesisGUIC# SDKpublic2021-03-16 12:46
Reporterai_enabledAssigned Tosfernandez 
PrioritynormalSeverityminorReproducibilityalways
Status feedbackResolutionopen 
Product Version3.0.10 
Target Version3.0.12Fixed in Version 
Summary0001940: IMultiValueConverter receives BaseComponent[] values when the control is hidden
DescriptionHi guys,

it's a new bug that just appeared in 3.0.10 and seems to be related to this change from the release notes:
"FIXED MultiBinding Converter should be called even if inner bindings failed to resolve."

The issue is: when the control is collapsed and it has a MultiValueConverter inside, object[] values provided to the IMultiValueConverter as arguments all appear as BaseComponent instance (the same instance several times; are they supposed to be "null"?)...see the attached screenshot.

Regards!
TagsNo tags attached.
PlatformAny

Activities

ai_enabled

ai_enabled

2021-03-15 18:33

updater  

Screenshot at 20-32-38.png (168,981 bytes)
Screenshot at 20-32-38.png (168,981 bytes)
sfernandez

sfernandez

2021-03-15 18:51

manager   ~0007080

When one of the binding is not resolved the converter will receive a DependencyProperty.UnsetValue in the corresponding index of the 'values' array.
Is that what you are seeing?
ai_enabled

ai_enabled

2021-03-15 19:28

updater   ~0007081

Last edited: 2021-03-15 19:28

View 2 revisions

You're right, it's DependencyProperty.UnsetValue. Thank you!
So I have to use FallbackValue or compare each value with the UnsetValue.
I was totally unaware of this feature as I've rarely used IMultiValueConverter (it was added fairly recently).

I was assuming it's some kind of data corruption. The issue happened with a quite complex data binding case like this one:
<hud:HUDButtonBadgeControl.Number>
    <MultiBinding Converter="{StaticResource ValuesAdditionMultiConverter}">
        <Binding Path="SomeInstance.DataContext.CountA" />
        <Binding Path="SomeInstance.DataContext.CountB/>
    </MultiBinding>
</hud:HUDButtonBadgeControl.Number>

Suggestion: define a new private class in C# SDK: DependencyPropertyUnsetValue. Use it specifically to return a singleton instance for DependencyProperty.UnsetValue. So library users like me will see it in the debugger and/or exception message, and understand that it's not a bug with some corrupted data being passed in.

Regards!

ai_enabled

ai_enabled

2021-03-15 19:33

updater   ~0007082

By the way, is it expected that FallbackValue provides "False"/"True" as a string instead of bool and "1"/"2"/"3.0"/etc as a string instead of the integer or floating-point number? It's quite complicated to use.
sfernandez

sfernandez

2021-03-15 19:37

manager   ~0007083

>> Suggestion: define a new private class in C# SDK: DependencyPropertyUnsetValue. Use it specifically to return a singleton instance for DependencyProperty.UnsetValue. So library users like me will see it in the debugger and/or exception message, and understand that it's not a bug with some corrupted data being passed in.
I was just thinking on exactly that because C# users shouldn't see any reference to BaseComponent. This will also apply to Binding.DoNothing value.
sfernandez

sfernandez

2021-03-15 20:12

manager   ~0007084

>> By the way, is it expected that FallbackValue provides "False"/"True" as a string instead of bool and "1"/"2"/"3.0"/etc as a string instead of the integer or floating-point number? It's quite complicated to use.
Yes, in WPF you will also receive the FallbackValue as a string, the same for the CommandParameter.

Issue History

Date Modified Username Field Change
2021-03-15 18:33 ai_enabled New Issue
2021-03-15 18:33 ai_enabled File Added: Screenshot at 20-32-38.png
2021-03-15 18:33 ai_enabled Summary IMultiValueConverter receives BaseComponent when the component is hidden => IMultiValueConverter receives BaseComponent[] values when the control is hidden
2021-03-15 18:33 ai_enabled Description Updated View Revisions
2021-03-15 18:33 ai_enabled Description Updated View Revisions
2021-03-15 18:34 ai_enabled Description Updated View Revisions
2021-03-15 18:51 sfernandez Assigned To => sfernandez
2021-03-15 18:51 sfernandez Status new => feedback
2021-03-15 18:51 sfernandez Note Added: 0007080
2021-03-15 19:28 ai_enabled Note Added: 0007081
2021-03-15 19:28 ai_enabled Status feedback => assigned
2021-03-15 19:28 ai_enabled Note Edited: 0007081 View Revisions
2021-03-15 19:33 ai_enabled Note Added: 0007082
2021-03-15 19:37 sfernandez Note Added: 0007083
2021-03-15 20:12 sfernandez Status assigned => feedback
2021-03-15 20:12 sfernandez Note Added: 0007084
2021-03-16 12:46 jsantos Target Version => 3.0.12