Public Class DlgCasillaVerificacion

  Private Sub ctTexto_PreviewTextInput(sender As System.Object, e As System.Windows.Input.TextCompositionEventArgs)
    Dim car As Char = e.Text(0)
    If cvConverMayus.IsChecked = False Then
      If Char.IsUpper(car) Then
        car = Char.ToLower(car)
      End If
    ElseIf cvConverMayus.IsChecked = True Then
      If Char.IsLower(car) Then
        car = Char.ToUpper(car)
      End If
    End If
    ctTexto.SelectedText = car.ToString()
    ctTexto.SelectionStart = ctTexto.Text.Length
    e.Handled = True
  End Sub

  Private Sub cvConverMayus_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
    ctTexto.Focus()
  End Sub
End Class
