コード例 #1
0
        public object Convert(object value, System.Type targetType, object parameter, CultureInfo culture)
        {
            int colorINT = (int)value;

            BUS.BUS_Color busColor = new BUS.BUS_Color();

            for (int i = 0; i < busColor.GetAllColors().Count; i++)
            {
                if (colorINT == busColor.GetAllColors()[i].ID)
                {
                    return(busColor.GetAllColors()[i].ColorName + $" ({colorINT})");
                }
            }

            return("");
        }