Answer the question
In order to leave comments, you need to log in
Is it possible to specify several converters in one binding?
It is necessary to bind Visibility to a bool variable at the element, for this I made a converter + I need to invert the value (such logic is simply needed), for this I made another converter, but it doesn’t work out to combine them ...
Answer the question
In order to leave comments, you need to log in
You don't need to make a second converter, but configure the one to return the desired value - return Visibility.Collapsed when true and Visibility.Visible when false.
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if ((bool)value)
{
return parameter != null ? Visibility.Collapsed : Visibility.Hidden;
}
return Visibility.Visible;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question