27 lines
664 B
C#
27 lines
664 B
C#
|
using System;
|
|||
|
using System.Globalization;
|
|||
|
using Xamarin.Forms;
|
|||
|
|
|||
|
namespace eShopOnContainers.Core.Converters
|
|||
|
{
|
|||
|
public class InverseCountToBoolConverter : IValueConverter
|
|||
|
{
|
|||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
{
|
|||
|
if (value is int)
|
|||
|
{
|
|||
|
int count = System.Convert.ToInt32(value);
|
|||
|
|
|||
|
return count == 0;
|
|||
|
}
|
|||
|
|
|||
|
return value;
|
|||
|
}
|
|||
|
|
|||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
{
|
|||
|
throw new NotImplementedException();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|