Мой код приведен ниже : xaml
Код: Выделить всё
Код: Выделить всё
public class ColorConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value != null)
{
String Value = (String)value;
if (Value.Equals("Credit"))
return Colors.Green;
else
return Colors.Red;
}
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
Подробнее здесь: https://stackoverflow.com/questions/217 ... in-listbox
Мобильная версия