LoginViewDesigner.GetEmptyDesignTimeHtml メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > LoginViewDesigner.GetEmptyDesignTimeHtml メソッドの意味・解説 

LoginViewDesigner.GetEmptyDesignTimeHtml メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

現在のテンプレート定義されていない場合に、関連付けられたコントロールのプレースホルダをデザイン表示するためのマークアップ取得します

名前空間: System.Web.UI.Design.WebControls
アセンブリ: System.Design (system.design.dll 内)
構文構文

Protected Overrides Function
 GetEmptyDesignTimeHtml As String
Dim returnValue As String

returnValue = Me.GetEmptyDesignTimeHtml
protected override string GetEmptyDesignTimeHtml
 ()
protected:
virtual String^ GetEmptyDesignTimeHtml () override
protected String GetEmptyDesignTimeHtml ()
protected override function GetEmptyDesignTimeHtml
 () : String

戻り値
デザイン サーフェイスにプレースホルダを表示するためのマークアップ テキスト含んだ文字列

解説解説

GetEmptyDesignTimeHtml メソッドは、最初に関連付けられた LoginView コントロール現在のテンプレートの名前を指定する文字列メッセージ書式設定しますまた、テンプレートが空であることも指定します次にGetEmptyDesignTimeHtml は、そのメッセージ含んだプレースホルダのマークアップ生成します

使用例使用例

LoginViewDesigner クラスから継承したクラスGetEmptyDesignTimeHtml メソッドオーバーライドすることにより、デザイン時にLoginView クラスから派生したコントロール外観変更するコード例次に示します。この例では、関連付けられたコントロール定義されているすべての RoleGroup オブジェクトの名前を含んだプレースホルダのマークアップ生成します

' Generate the design-time markup for the control 
' when the template is empty.
Protected Overrides Function
 GetEmptyDesignTimeHtml() As String

    ' Generate a design-time placeholder containing the names of all
    ' the role groups.
    Dim myLoginViewCtl As MyLoginView = CType(ViewControl,
 MyLoginView)
    Dim roleGroups As RoleGroupCollection =
 myLoginViewCtl.RoleGroups
    Dim RoleNames As String
 = Nothing
    Dim rgX As Integer

    ' If there are any role groups, form a string of their names.
    If roleGroups.Count > 0 Then

        roleNames = "Role Groups: <br /> &nbsp;&nbsp;"
 & _
            roleGroups(0).ToString()

        For rgX = 1 To roleGroups.Count - 1
            roleNames &= "<br /> &nbsp;&nbsp;"
 & _
                roleGroups(rgX).ToString()
        Next rgX
    End If

    Return CreatePlaceHolderDesignTimeHtml(roleNames)

End Function ' GetEmptyDesignTimeHtml
// Generate the design-time markup for the control 
// when the template is empty.
protected override string GetEmptyDesignTimeHtml()
{
    // Generate a design-time placeholder containing the names of all
    // the role groups.
    MyLoginView myLoginViewCtl = (MyLoginView)ViewControl;
    RoleGroupCollection roleGroups = myLoginViewCtl.RoleGroups;
    string roleNames = null;

    // If there are any role groups, form a string of their names.
    if (roleGroups.Count > 0)
    {
        roleNames = "Role Groups: <br /> &nbsp;&nbsp;" +
 
            roleGroups[0].ToString();

        for( int rgX = 1; rgX < roleGroups.Count;
 rgX++ )
            roleNames += 
                "<br /> &nbsp;&nbsp;" + roleGroups[rgX].ToString();
    }
    return CreatePlaceHolderDesignTimeHtml( roleNames);
} // GetEmptyDesignTimeHtml
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
LoginViewDesigner クラス
LoginViewDesigner メンバ
System.Web.UI.Design.WebControls 名前空間
GetDesignTimeHtml
CreatePlaceHolderDesignTimeHtml
LoginView



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

LoginViewDesigner.GetEmptyDesignTimeHtml メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



LoginViewDesigner.GetEmptyDesignTimeHtml メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS