15 lines
508 B
C#
15 lines
508 B
C#
using System.Globalization;
|
|
using System.Windows;
|
|
using System.Windows.Data;
|
|
|
|
namespace ytLive.Helpers;
|
|
|
|
public class AllTrueToVisibilityConverter : IMultiValueConverter
|
|
{
|
|
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
|
=> values.All(v => v is true) ? Visibility.Visible : Visibility.Collapsed;
|
|
|
|
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
|
=> throw new NotSupportedException();
|
|
}
|