WebPartDescription.Title プロパティ
アセンブリ: System.Web (system.web.dll 内)


Title プロパティの値は、WebPart.DisplayTitle プロパティに直接対応します。対応する WebPart コントロールがその DisplayTitle プロパティに対して何らかの値を設定している場合は、それが Title プロパティの値になります。それ以外の場合、タイトルは計算された値になります。
Title プロパティは、ページがカタログ表示モードである場合のみ適用され、コントロールのカタログに WebPart コントロールが表示されます。WebPart コントロールに割り当てられたタイトルは、カタログ内のコントロールの横に表示されます。

Title プロパティのプログラムでの使用方法を示すコード例を次に示します。このコード例の実行に必要なコード全体については、WebPartDescription クラスの概要のトピックで「例」を参照してください。
Web ページの Button1_Click メソッド内にある次のコードは、カタログ内のWebPartDescription オブジェクトのコレクションを GetAvailableWebPartDescriptions メソッドを使用して取得する方法と、カタログ内の各 WebPart コントロールの詳細を WebPartDescription オブジェクトをループして表示する方法を示します。Title プロパティ値は次のコードで取得されます。
Protected Sub Button1_Click(ByVal sender As Object, _ ByVal e As System.EventArgs) Label1.Text = String.Empty Dim descriptions As WebPartDescriptionCollection = _ DeclarativeCatalogPart1.GetAvailableWebPartDescriptions() Dim desc As WebPartDescription For Each desc In descriptions Label1.Text += "ID: " & desc.ID & "<br />" & _ "Title: " & desc.Title & "<br />" & _ "Description: " & desc.Description & "<br />" & _ "ImageUrl: " & desc.CatalogIconImageUrl & "<br />" & _ "<hr />" Next End Sub
protected void Button1_Click(object sender, EventArgs e) { Label1.Text = String.Empty; WebPartDescriptionCollection descriptions = DeclarativeCatalogPart1.GetAvailableWebPartDescriptions(); foreach (WebPartDescription desc in descriptions) { Label1.Text += "ID: " + desc.ID + "<br />" + "Title: " + desc.Title + "<br />" + "Description: " + desc.Description + "<br />" + "ImageUrl: " + desc.CatalogIconImageUrl + "<br />" + "<hr />"; } }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からWebPartDescription.Title プロパティを検索する場合は、下記のリンクをクリックしてください。

- WebPartDescription.Title プロパティのページへのリンク