using System.Globalization; using System.Windows.Data; namespace OperationControl.Converters { public class NullToVisibilityConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) => value == null ? System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible; public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) => throw new NotImplementedException(); } }