Compartir por


CharacterCasing Enumeración

Definición

Especifica el caso de caracteres escrito manualmente en un control TextBox.

public enum class CharacterCasing
public enum CharacterCasing
type CharacterCasing = 
Public Enum CharacterCasing
Herencia
CharacterCasing

Campos

Nombre Valor Description
Normal 0

Los caracteres que se escriben en un TextBox no se convierten.

Lower 1

Los caracteres que se escriben en un TextBox se convierten en minúsculas.

Upper 2

Los caracteres que se escriben en un TextBox se convierten en mayúsculas.

Ejemplos

En el ejemplo siguiente se muestra cómo usar la CharacterCasing propiedad para convertir todos los caracteres en mayúsculas que se escriben manualmente en .TextBox

<Page  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
  <StackPanel>

    <!-- The CharacterCasing property of this TextBox is set to "Upper" which 
         causes all manually typed characters to be converted to uppercase. -->
    <TextBox CharacterCasing="Upper" Width="100" />
  </StackPanel>
</Page>
using System.Windows.Controls;
namespace SDKSample
{
    public partial class CharacterCasingExample : Page
    {
        public CharacterCasingExample()
        {
            StackPanel myStackPanel = new StackPanel();

            // Create TextBox.
            TextBox myTextBox = new TextBox();
            myTextBox.Width = 100;

            // The CharacterCasing property of this TextBox is set to 
            // "Upper" which causes all manually typed characters to 
            // be converted to upper case.
            myTextBox.CharacterCasing = CharacterCasing.Upper;
            myStackPanel.Children.Add(myTextBox);
            this.Content = myStackPanel;
        }
    }
}

Imports System.Windows
Imports System.Windows.Controls

Namespace SDKSample
    Partial Public Class CharacterCasingExample
        Inherits Page
        Public Sub New()
            Dim myStackPanel As New StackPanel()

            'Create TextBox
            Dim myTextBox As New TextBox()
            myTextBox.Width = 100

            ' The CharacterCasing property of this TextBox is set to 
            ' "Upper" which causes all manually typed characters to 
            ' be converted to upper case.
            myTextBox.CharacterCasing = CharacterCasing.Upper
            myStackPanel.Children.Add(myTextBox)
            Me.Content = myStackPanel
        End Sub
    End Class
End Namespace

Comentarios

El valor de esta enumeración no afecta a los caracteres que se agregan a un objeto TextBox mediante programación.

Se aplica a