System.Windows.Controls.BooleanToVisibilityConverter.ConvertBack C# (CSharp) Method

ConvertBack() public method

Convertes the visibility value parameter to a boolean value. Visible converts to true and collapsed converts to false.
public ConvertBack ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object The visibility value that is to be converted.
targetType Type The type to which the value is to be converted. In this case it is always .
parameter object A parameter for the conversion. Not used in this converter, so it should always be null.
culture System.Globalization.CultureInfo The culture information of the current culture, so that parsing can be adjusted to cultural conventions.
return object
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => (Visibility)value == Visibility.Visible ? true : false;

Usage Example

Example #1
0
 public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 {
     if (value is Visibility vis)
     {
         return(vis == Visibility.Visible);
     }
     return(core.ConvertBack(value, targetType, parameter, culture));
 }
All Usage Examples Of System.Windows.Controls.BooleanToVisibilityConverter::ConvertBack
BooleanToVisibilityConverter