You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To calculate the visibilty of a control i'm using CalcBinding something like 'A?.B?.C > 0'.
I get a binding error saying "Value produced by BindingExpression is not valid for target property.; Value=''"
I also tried 'A != null and A.B != null and A.B.C > 0' but i can't get it to work.
So the question: is Null-conditional operator supported?
Is it null supported in comparisons?
Thanks
P.S. - A naive converter works just fine
public class CarouselVisibility : BaseConverter, IValueConverter
{
public object Convert( object value, Type targetType, object parameter, CultureInfo culture )
{
var vm = value as ViewModel;
return vm?.A?.B?.C?.Count > 0 ? Visibility.Visible : Visibility.Collapsed;
}
public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture )
{
throw new NotImplementedException();
}
}
The text was updated successfully, but these errors were encountered:
On 13 Dec 2020, at 22:18, Keytrap ***@***.***> wrote:
Try
'A != {x:Null} and A.B != {x:Null} and A.B.C > 0'
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
To calculate the visibilty of a control i'm using CalcBinding something like 'A?.B?.C > 0'.
I get a binding error saying "Value produced by BindingExpression is not valid for target property.; Value=''"
I also tried 'A != null and A.B != null and A.B.C > 0' but i can't get it to work.
So the question: is Null-conditional operator supported?
Is it null supported in comparisons?
Thanks
P.S. - A naive converter works just fine
The text was updated successfully, but these errors were encountered: