Class MainWindow 
  Private familiaPre As FontFamily
  Private tamañoPre As Double

  Private Sub Window_Loaded(sender As System.Object, e As System.Windows.RoutedEventArgs)
    familiaPre = ctEditor.FontFamily
    tamañoPre = ctEditor.FontSize
  End Sub

  Private Sub ArchivoSalir_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
    Close()
  End Sub

  Private Sub OpcionesFuenteCourier_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
    ctEditor.FontFamily = New FontFamily("Courier New")
  End Sub

  Private Sub OpcionesFuenteArial_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
    ctEditor.FontFamily = New FontFamily("Arial")
  End Sub

  Private Sub OpcionesFuentePre_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
    ctEditor.FontFamily = familiaPre
  End Sub

  Private Sub OpcionesTamaño16_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
    ctEditor.FontSize = 16.0
  End Sub

  Private Sub OpcionesTamaño24_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
    ctEditor.FontSize = 24.0
  End Sub

  Private Sub OpcionesTamañoPre_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
    ctEditor.FontSize = tamañoPre
  End Sub

  Private Sub AyudaAcercaDe_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
    Dim créditos As String = "Aplicación Editor" & vbLf &
                             "Editor básico de textos" & vbLf &
                             "(c) Fco. Javier Ceballos"
    MessageBox.Show(créditos, "Acerca de")
  End Sub
End Class
