Login.InstructionTextStyle プロパティ

定義

TableItemStyle コントロールの指示テキストの設定を定義する Login オブジェクトへの参照を取得します。

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

プロパティ値

TableItemStyle コントロールの指示テキストのスタイル設定を格納する Login への参照。

属性

次のコード例では、 プロパティによって参照されるオブジェクトのプロパティを設定することで、命令テキストと命令テキストの TableItemStyle 背景色を InstructionTextStyle 設定します。

<%@ Page Language="C#" AutoEventWireup="False"%>
<!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:Login id="Login1" runat="server" 
            InstructionText="Enter your user name and password to log in.">
        <InstructionTextStyle Font-Bold="True" ForeColor="#E0E0E0" BackColor="Gray"></InstructionTextStyle>
        </asp:Login>
    </form>
</body>
</html>
<%@ Page Language="VB" AutoEventWireup="False"%>
<!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:Login id="Login1" runat="server" 
            InstructionText="Enter your user name and password to log in.">
        <InstructionTextStyle Font-Bold="True" ForeColor="#E0E0E0" BackColor="Gray"></InstructionTextStyle>
        </asp:Login>
    </form>
</body>
</html>

注釈

プロパティは InstructionTextStyle 、コントロール内の命令テキストの外観を Login 定義します。 このプロパティは読み取り専用です。ただし、返されるオブジェクトのプロパティを TableItemStyle 設定できます。 これらのプロパティは、 という形式 Property-Subpropertyで宣言的に設定できます。ここで Subproperty 、 は クラスの TableItemStyle プロパティ (例: InstructionTextStyle-ForeColor) を表します。 プロパティは、プログラムでフォーム Property.Subproperty で設定できます (例: InstructionTextStyle.ForeColor)。

一般的な設定には、ユーザー設定の背景色、テキストの色、フォント プロパティが含まれます。 プロパティは InstructionTextStyle 、 プロパティの外観を InstructionText 定義します。

プロパティの InstructionTextStyle スタイル設定は、コントロールのスタイル設定 Login とマージされます。 プロパティで行われた設定は、 InstructionTextStyle コントロールのプロパティの対応する設定を Login オーバーライドします。

Login のスタイル プロパティは、設定によって InstructionTextStyle オーバーライドされます。

テンプレートを使用してコントロールの Login 外観を定義する場合、 InstructionTextStyle プロパティは無効です。

適用対象

こちらもご覧ください