Public Class ConversorDoubleBrush
  Implements IValueConverter
  Public Function Convert(value As Object, targetType As Type,
  parameter As Object, culture As System.Globalization.CultureInfo) _
  As Object Implements IValueConverter.Convert
    ' Hacer la conversión sólo si se requiere un pincel
    If targetType <> GetType(Brush) Then
      Return Nothing
    End If
    Dim grados As Double = Double.Parse(value.ToString())
    Return If(grados <= -3, Brushes.Red, Brushes.Black)
  End Function

  Public Function ConvertBack(value As Object, targetType As Type,
  parameter As Object, culture As System.Globalization.CultureInfo) _
  As Object Implements IValueConverter.ConvertBack
    ' No se utiliza en este ejemplo
    Throw New NotImplementedException()
  End Function
End Class
