CharacterCasing 열거형

정의

TextBox 컨트롤에 있는 문자의 대/소문자를 지정합니다.

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

필드

Lower 2

모든 문자를 소문자로 변환합니다.

Normal 0

문자의 대/소문자가 변경되지 않습니다.

Upper 1

모든 문자를 대문자로 변환합니다.

예제

다음 예제에서는 TextBox 암호를 적용 하는 데 사용 되는 컨트롤입니다. 이 예제에서는 합니다 CharacterCasing 대문자로 입력 한 모든 문자를 변경 하는 속성 및 MaxLength 암호는 길이가 8 자로 제한 하는 속성입니다. 또한이 예제에서는 합니다 TextAlign 속성에 암호를 가운데를 TextBox 컨트롤입니다.

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 컨트롤입니다.

적용 대상