View Issue Details

IDProjectCategoryView StatusLast Update
0001282NoesisGUIC# SDKpublic2018-11-22 12:51
Reporterai_enabled Assigned Tosfernandez  
PrioritynormalSeverityfeature 
Status resolvedResolutionfixed 
Product Version2.1.0f1 
Target Version2.2.0Fixed in Version2.2.0b1 
Summary0001282: Binding when datacontext is null. Implement TargetNullValue?
Description

Hi guys,

For example, I have a control with the control template:

<Border Background="Red"
Visibility="{Binding MyViewModelPropertyVisibility}">
...
</Border>

I would like to make visibility collapsed when the data context is null.
However, it seems impossible right now to do this directly as TargetNullValue is not implemented.

I've tried

Visibility="{Binding Path=., Converter={StaticResource NullToVisibilityConverter}}"

But the converter method doesn't even called by NoesisGUI when datacontext is null.

Regards!

PlatformAny

Activities

sfernandez

sfernandez

2018-04-10 23:03

manager   ~0005183

I know is not the same, but couldn't you use the FallbackValue that we already have implemented for these situations?

<Border Background="Red"
Visibility="{Binding MyViewModelPropertyVisibility, FallbackValue=Collapsed}">
...
</Border>

ai_enabled

ai_enabled

2018-04-11 06:40

updater   ~0005185

Thanks!
Didn't knew it was implemented. Yes, it works fine.

Issue History

Date Modified Username Field Change
2018-04-06 14:14 ai_enabled New Issue
2018-04-06 14:15 ai_enabled Description Updated
2018-04-10 23:03 sfernandez Assigned To => sfernandez
2018-04-10 23:03 sfernandez Status new => feedback
2018-04-10 23:03 sfernandez Note Added: 0005183
2018-04-11 06:40 ai_enabled Note Added: 0005185
2018-04-11 06:40 ai_enabled Status feedback => assigned
2018-11-01 02:14 jsantos View Status public => private
2018-11-22 12:51 sfernandez Target Version => 2.2.0
2018-11-22 12:51 sfernandez View Status private => public
2018-11-22 12:51 sfernandez Platform => Any
2018-11-22 12:51 sfernandez Status assigned => resolved
2018-11-22 12:51 sfernandez Resolution open => fixed
2018-11-22 12:51 sfernandez Fixed in Version => 2.2.0b1