PasswordRecovery.LabelStyle プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
PasswordRecovery コントロールのテキスト ボックスのラベルの外観を定義するスタイル プロパティのコレクションへの参照を取得します。
public:
property System::Web::UI::WebControls::TableItemStyle ^ LabelStyle { System::Web::UI::WebControls::TableItemStyle ^ get(); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
public System.Web.UI.WebControls.TableItemStyle LabelStyle { get; }
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
member this.LabelStyle : System.Web.UI.WebControls.TableItemStyle
Public ReadOnly Property LabelStyle As TableItemStyle
プロパティ値
テキスト ボックスのラベルの外観を定義するプロパティを格納している TableItemStyle への参照。
- 属性
例
次のコード例では、このプロパティを LabelStyle 使用して、コントロール内のテキスト ボックス ラベルの外観を PasswordRecovery 変更します。
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
<asp:PasswordRecovery id="PasswordRecovery1" runat="server"
AnswerLabelText="Your answer:"
QuestionLabelText="Answer this question:"
UserNameLabelText="Your user name:">
<LabelStyle
font-bold="True"
forecolor="White"
backcolor="Navy">
</LabelStyle>
</asp:PasswordRecovery>
</form>
</body>
</html>
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
<asp:PasswordRecovery id="PasswordRecovery1" runat="server"
UserNameLabelText="Your user name:"
QuestionLabelText="Answer this question:"
AnswerLabelText="Your answer:">
<LabelStyle
font-bold="True"
forecolor="White"
backcolor="Navy">
</LabelStyle>
</asp:PasswordRecovery>
</form>
</body>
</html>
注釈
このプロパティは LabelStyle 、コントロール内のテキスト ボックス ラベルの外観を PasswordRecovery 定義します。 このプロパティは読み取り専用です。ただし、返されるオブジェクトのプロパティを Style 設定できます。 これらのプロパティは、クラスのプロパティ (たとえばLabelStyle-ForeColor
) Subproperty
を表すStyleフォームProperty-Subproperty
で宣言によって設定できます。 フォーム Property.Subproperty
(たとえば LabelStyle.ForeColor
) でプログラムでプロパティを設定することもできます。
一般的な設定には、ユーザー設定の背景色、テキストの色、およびフォント プロパティが含まれます。
このプロパティは LabelStyle 、次のプロパティの外観を定義します。
プロパティに対して LabelStyle 行われたスタイル設定は、コントロールのスタイル設定 PasswordRecovery とマージされます。 プロパティで行われた設定は、 LabelStyle コントロールのプロパティ内の対応する設定を PasswordRecovery オーバーライドします。
次 PasswordRecovery のプロパティは、設定によって LabelStyle オーバーライドされます。
テンプレートを使用してコントロールの UserName ビューと質問ビューの PasswordRecovery 外観を定義する場合、 LabelStyle プロパティは無効になります。