public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if(value == null)
{
return Brushes.Black;
}
switch((PostedTimeType)value)
{
case PostedTimeType.Normal:
return Brushes.White;
case PostedTimeType.PersonalBest:
return Brushes.LimeGreen;
case PostedTimeType.SessionBest:
return Brushes.Magenta;
default:
throw new ArgumentOutOfRangeException("value");
}
}