Example #1
0
        private void FilterColor(object filter)
        {
            if (CanFilterColor(filter))
            {
                colorFilter = (ProductColorFilter)filter;

                ResetPageing();
            }
        }
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (!(value is ProductColorFilter))
            {
                return(null);
            }

            ProductColorFilter sizeUnit = (ProductColorFilter)value;

            switch (sizeUnit)
            {
            case ProductColorFilter.NoFilter:
                return(Resources.UndefinedEmpty);

            default:
                return(sizeUnit.ToString());
            }
            throw new InvalidOperationException("Enum value is unknown.");
        }