View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001735 | NoesisGUI | C# SDK | public | 2020-06-24 03:55 | 2020-07-01 12:18 |
Reporter | ai_enabled | Assigned To | sfernandez | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.0.1 | ||||
Target Version | 3.0.3 | Fixed in Version | 3.0.3 | ||
Summary | 0001735: Multibinding issues | ||||
Description | Hi 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 Reproduce | Here 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. | ||||
Tags | No tags attached. | ||||
Platform | Any | ||||
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. |
|
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! |
|
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 |