CharacterCasing Sabit listesi
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
TextBox denetimindeki karakterlerin büyük/küçük harf durumunu belirtir.
public enum class CharacterCasing
public enum CharacterCasing
type CharacterCasing =
Public Enum CharacterCasing
- Devralma
Alanlar
| Name | Değer | Description |
|---|---|---|
| Normal | 0 | Karakterlerin durumu değişmeden bırakılır. |
| Upper | 1 | Tüm karakterleri büyük harfe dönüştürür. |
| Lower | 2 | Tüm karakterleri küçük harfe dönüştürür. |
Örnekler
Aşağıdaki örnek, parola kabul etmek için kullanılan bir denetim oluşturur TextBox . Bu örnek, CharacterCasing büyük harfe yazılan tüm karakterleri değiştirmek için özelliğini ve MaxLength parola uzunluğunu sekiz karakterle kısıtlamak için özelliğini kullanır. Bu örnekte, denetimdeki TextBox parolayı TextAlign ortalamak için özelliği de kullanılır.
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
Açıklamalar
Denetimin özelliğinin değerini ayarlamak için bu numaralandırmanın CharacterCasing üyelerini TextBox kullanın.