TextBox.MaxLength 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定指定使用者輸入最大字元數的值。
public:
property int MaxLength { int get(); void set(int value); };
int MaxLength();
void MaxLength(int value);
public int MaxLength { get; set; }
var int32 = textBox.maxLength;
textBox.maxLength = int32;
Public Property MaxLength As Integer
<TextBox MaxLength="int"/>
屬性值
Int32
int
使用者輸入的最大字元數。 預設值是 0(無限制)。
備註
MaxLength 值為 0 表示使用者輸入字元數沒有限制。