
namespace HistoryView.Converters;

public class CollectionToVisibility : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
        dynamic d = value;
        try
        {
            if (d.Count == 0)
            {
                return Visibility.Collapsed;
            }
        }
        catch
        {

        }

        return Visibility.Visible;
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}
