Share via


RichEditBox.MaxLength 属性

定义

获取或设置值,该值指定用户输入允许的最大字符数。

public:
 property int MaxLength { int get(); void set(int value); };
int MaxLength();

void MaxLength(int value);
public int MaxLength { get; set; }
var int32 = richEditBox.maxLength;
richEditBox.maxLength = int32;
Public Property MaxLength As Integer
<RichEditBox MaxLength="int"/>

属性值

Int32

int

用户输入允许的最大字符数。 默认值为 0 (无限制) 。

Windows 要求

设备系列
Windows 10 Creators Update (在 10.0.15063.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v4.0 中引入)

注解

MaxLength 值为 0 指定用户输入允许的字符数没有限制。

适用于