语言

MaskedTextBox.TextMaskFormat 属性

定义

获取或设置一个值,该值确定文本和提示字符是否包含在格式化字符串中。

public:
 property System::Windows::Forms::MaskFormat TextMaskFormat { System::Windows::Forms::MaskFormat get(); void set(System::Windows::Forms::MaskFormat value); };
public System.Windows.Forms.MaskFormat TextMaskFormat { get; set; }
member this.TextMaskFormat : System.Windows.Forms.MaskFormat with get, set
Public Property TextMaskFormat As MaskFormat

属性值

其中一个 MaskFormat 值。 默认值为 IncludeLiterals。

例外

使用无效值设置 MaskFormat 的属性。

注解

该 TextMaskFormat 属性确定生成格式化字符串时如何处理掩码中的文本和提示字符。 更具体地说,它确定属性中是否包括 Text 文本字符、提示字符或两者。 排除提示字符后,它们将转换为带格式字符串的空格。

注释

该 CutCopyMaskFormat 属性在解释属性的方式 Text 方面具有类似的用途。

适用于

另请参阅