MaskedTextProvider.AllowPromptAsInput 属性

定义

获取一个值,该值指示是否应将提示字符视为有效的输入字符。Gets a value indicating whether the prompt character should be treated as a valid input character or not.

public:
 property bool AllowPromptAsInput { bool get(); };
public bool AllowPromptAsInput { get; }
member this.AllowPromptAsInput : bool
Public ReadOnly Property AllowPromptAsInput As Boolean

属性值

如果用户可将 PromptChar 输入到控件,则为 true;否则为 falsetrue if the user can enter PromptChar into the control; otherwise, false. 默认值为 trueThe default is true.

注解

AllowPromptAsInput属性的值MaskedTextProvider在构造函数中设置。The AllowPromptAsInput property's value is set in the MaskedTextProvider constructor.

AllowPromptAsInput即使为true,提示字符也必须对掩码中的当前位置有效,才能接受。Even when AllowPromptAsInput is true, the prompt character must be valid for the current location in the mask in order to be accepted.

适用于

另请参阅