BitTim_VexTrack/VexTrack/MVVM/Converter/InvertedBooleanToVisibilityConverter.cs
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace VexTrack.MVVM.Converter;

internal class InvertedBooleanToVisibilityConverter : IValueConverter
{
	public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
	{
		var val = (bool)value!;

		var param = parameter != null && bool.Parse((string)parameter);

		if (!val) return Visibility.Visible;
		return param ? Visibility.Collapsed : Visibility.Hidden;
	}

	public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
	{
		return null;
	}
}