CharacterCasing CharacterCasing CharacterCasing CharacterCasing Enum

정의

TextBox 컨트롤에 있는 문자의 대/소문자를 지정합니다.Specifies the case of characters in a TextBox control.

public enum class CharacterCasing
public enum CharacterCasing
type CharacterCasing = 
Public Enum CharacterCasing
상속
CharacterCasingCharacterCasingCharacterCasingCharacterCasing

필드

Lower Lower Lower Lower 2

모든 문자를 소문자로 변환합니다.Converts all characters to lowercase.

Normal Normal Normal Normal 0

문자의 대/소문자가 변경되지 않습니다.The case of characters is left unchanged.

Upper Upper Upper Upper 1

모든 문자를 대문자로 변환합니다.Converts all characters to uppercase.

예제

다음 예제에서는 TextBox 암호를 적용 하는 데 사용 되는 컨트롤입니다.The following example creates a TextBox control that is used to accept a password. 이 예제에서는 합니다 CharacterCasing 대문자로 입력 한 모든 문자를 변경 하는 속성 및 MaxLength 암호는 길이가 8 자로 제한 하는 속성입니다.This example uses the CharacterCasing property to change all characters typed to uppercase and the MaxLength property to restrict the password length to eight characters. 또한이 예제에서는 합니다 TextAlign 속성에 암호를 가운데를 TextBox 컨트롤입니다.This example also uses the TextAlign property to center the password in the TextBox control.

public:
   void CreateMyPasswordTextBox()
   {
      // Create an instance of the TextBox control.
      TextBox^ textBox1 = gcnew TextBox;
      // Set the maximum length of text in the control to eight.
      textBox1->MaxLength = 8;
      // Assign the asterisk to be the password character.
      textBox1->PasswordChar = '*';
      // Change all text entered to be lowercase.
      textBox1->CharacterCasing = CharacterCasing::Lower;
      // Align the text in the center of the TextBox control.
      textBox1->TextAlign = HorizontalAlignment::Center;
   }
public void CreateMyPasswordTextBox()
 {
    // Create an instance of the TextBox control.
    TextBox textBox1 = new TextBox();
    // Set the maximum length of text in the control to eight.
    textBox1.MaxLength = 8;
    // Assign the asterisk to be the password character.
    textBox1.PasswordChar = '*';
    // Change all text entered to be lowercase.
    textBox1.CharacterCasing = CharacterCasing.Lower;
    // Align the text in the center of the TextBox control.
    textBox1.TextAlign = HorizontalAlignment.Center;
 }
 
Public Sub CreateMyPasswordTextBox()
    ' Create an instance of the TextBox control.
    Dim textBox1 As New TextBox()
    ' Set the maximum length of text in the control to eight.
    textBox1.MaxLength = 8
    ' Assign the asterisk to be the password character.
    textBox1.PasswordChar = "*"c
    ' Change all text entered to be lowercase.
    textBox1.CharacterCasing = CharacterCasing.Lower
    ' Align the text in the center of the TextBox control.
    textBox1.TextAlign = HorizontalAlignment.Center
End Sub

설명

이 열거형의 멤버 값을 설정 하는 데는 CharacterCasing 의 속성을 TextBox 컨트롤입니다.Use the members of this enumeration to set the value of the CharacterCasing property of the TextBox control.

적용 대상