Login.ValidatorTextStyle 属性

定义

获取对 Style 属性集合的引用,这些属性定义与 Login 控件使用的验证程序关联的错误消息的外观。Gets a reference to a collection of Style properties that define the appearance of error messages associated with validators used by the Login control.

public:
 property System::Web::UI::WebControls::Style ^ ValidatorTextStyle { System::Web::UI::WebControls::Style ^ get(); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
public System.Web.UI.WebControls.Style ValidatorTextStyle { get; }
member this.ValidatorTextStyle : System.Web.UI.WebControls.Style
Public ReadOnly Property ValidatorTextStyle As Style

属性值

包含样式设置的 StyleA Style containing the style settings.

属性

注解

下表列出了可通过 ValidatorTextStyle 属性进行自定义的样式设置。The following table lists the style settings that are available for customization with the ValidatorTextStyle property.

设置Setting 说明Description
BackColor 错误消息后面的颜色。The color behind the error messages. 颜色可以是 Color 的任何属性。The color can be any of the Color properties.
BorderColor 错误消息周围边框的颜色。The color of the border around the error messages. 颜色可以是 Color 的任何属性。The color can be any of the Color properties.
BorderStyle 错误消息周围边框的样式。The style of the border around the error messages. 样式可以是 "None"、"虚线"、"虚线"、"实线"、"Double"、"沟"、"凸"、"内陷" 或 "外嵌"。The style can be "None", "Dotted", "Dashed", "Solid", "Double", "Groove", "Ridge", "Inset", or "Outset". 默认值为 "NotSet"。The default is "NotSet". 某些样式不会清晰显示,除非 BorderWidth 值大于2。Some styles do not show up clearly unless the BorderWidth value is greater than 2.
BorderWidth 错误消息周围边框的宽度。The width of the border around the error messages.
CssClass 用于呈现错误消息的级联样式表(CSS)类。The cascading style sheet (CSS) class used to render the error messages. 如果指定了其他设置,则它们将重写样式表设置。If other settings are specified, they will override a style sheet setting.
Font-Bold true 以粗体显示错误消息文本。true to display the error message text in bold type.
Font-Italic true 以斜体类型显示错误消息文本。true to display the error message text in italic type.
Font-Names 字体的名称。The name of the font face.
Font-Overline true 在其上方显示错误消息文本。true to display the error message text with a line above it.
Font-Size 作为 FontUnit 对象的错误消息中的文本大小。The size of the text in the error messages as a FontUnit object.
Font-Strikeout true,则显示超出的错误消息文本。true to display the error message text as crossed out.
Font-Underline true,则使用下划线显示错误消息文本。true to display the error message text with an underline.
ForeColor 错误消息中的文本颜色。The color of the text in the error messages. 颜色可以是 Color 的任何属性。The color can be any of the Color properties.
Height 一个 Unit 对象,该对象表示错误消息的高度。A Unit object that represents the height of the error messages.
Width 一个 Unit 对象,该对象表示错误消息的宽度。A Unit object that represents the width of the error messages.

适用于

另请参阅