20 lines
463 B
C#
20 lines
463 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows;
|
|
using System.Windows.Data;
|
|
|
|
namespace AxCopilot.Themes;
|
|
|
|
public class CountToVisibilityConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type t, object p, CultureInfo c)
|
|
{
|
|
return (!(value is int num) || num <= 0) ? Visibility.Collapsed : Visibility.Visible;
|
|
}
|
|
|
|
public object ConvertBack(object v, Type t, object p, CultureInfo c)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|