CharacterCasing CharacterCasing CharacterCasing CharacterCasing Enum

Definición

Especifica el tipo de caracteres (mayúsculas o minúsculas) escritos manualmente en un control TextBox.Specifies the case of characters typed manually into a TextBox control.

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

Campos

Lower Lower Lower Lower 1

Los caracteres escritos en un control TextBox se convierten a minúsculas.Characters typed into a TextBox are converted to lowercase.

Normal Normal Normal Normal 0

No se convierten los caracteres escritos en un control TextBox.Characters typed into a TextBox are not converted.

Upper Upper Upper Upper 2

Los caracteres escritos en un control TextBox se convierten a mayúsculas.Characters typed into a TextBox are converted to uppercase.

Ejemplos

El ejemplo siguiente muestra cómo usar el CharacterCasing propiedad para convertir todos los caracteres en mayúsculas que se especifican manualmente en un TextBox.The following example shows how to use the CharacterCasing property to convert all characters to uppercase that are manually entered into a TextBox.

<Page  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <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;
using System.Windows;
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
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 TextBox mediante programación.The value of this enumeration does not affect characters that are added to a TextBox programmatically.

Se aplica a