15 lines
593 B
C#
15 lines
593 B
C#
using System.Globalization;
|
|
using System.Windows;
|
|
using System.Windows.Data;
|
|
|
|
namespace VideoDownloader.App;
|
|
|
|
/// <summary>컬렉션 카운트 → 빈 상태 표시용 (0일 때 Visible)</summary>
|
|
public class InverseCountToVisibilityConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
=> (value is int i && i > 0) ? Visibility.Collapsed : Visibility.Visible;
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
=> throw new NotImplementedException();
|
|
}
|