Imports System.ComponentModel

Class CGrados
  Implements INotifyPropertyChanged
  Private _gradosC As Double = 0.0
  Private _gradosF As Double = 32.0

  Public Event PropertyChanged As PropertyChangedEventHandler _
    Implements INotifyPropertyChanged.PropertyChanged

  Private Sub NotificarCambio(nombreProp As String)
    RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(nombreProp))
  End Sub

  Public Property GradosC() As Double
    Get
      Return _gradosC
    End Get
    Set(value As Double)
      _gradosC = value
      NotificarCambio("GradosC")
    End Set
  End Property

  Public Property GradosF() As Double
    Get
      Return _gradosF
    End Get
    Set(value As Double)
      _gradosF = value
      NotificarCambio("GradosF")
    End Set
  End Property
End Class
