WebDisplayNameAttribute クラス
アセンブリ: System.Web (system.web.dll 内)

<AttributeUsageAttribute(AttributeTargets.Property)> _ Public Class WebDisplayNameAttribute Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Property)] public class WebDisplayNameAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Property)] public ref class WebDisplayNameAttribute : public Attribute

PropertyGridEditorPart コントロールは、ユーザーが、WebPart のカスタム プロパティや WebPartZoneBase ゾーンに配置されるサーバー コントロールのカスタム プロパティを編集できるようにする汎用のユーザー インターフェイス (UI: User Interface) を提供します。この編集 UI は、ソース コード中で WebBrowsableAttribute クラスの WebBrowsable 属性でマークされるプロパティ用に用意されています。プロパティがこの属性によってマークされると、PropertyGridEditorPart コントロールは、プロパティの型に基づいて編集 UI を作成し、必要に応じて PropertyDescriptor オブジェクトを使用して、各編集コントロール内の値をプロパティの型に変換します。
WebDisplayNameAttribute クラスの WebDisplayName 属性によって、編集 UI の各コントロールに表示されるラベルのテキストを指定できます。

WebDisplayNameAttribute 属性を使用して、Web パーツ コントロールのプロパティに表示名を割り当てる方法を次のコード例に示します。カスタム UserJobType プロパティは、PropertyGridEditorPart コントロールに表示する表示名 "Job Type" を割り当てられます。この例は PropertyGridEditorPart クラスの概要で取り上げているコード例の一部です。
<Personalizable(), WebBrowsable(), WebDisplayName("Job Type"), _ WebDescription("Select the category that corresponds to your job.")> _ Public Property UserJobType() As JobTypeName Get Dim o As Object = ViewState("UserJobType") If Not (o Is Nothing) Then Return CType(o, JobTypeName) Else Return _userJobType End If End Get Set(ByVal value As JobTypeName) _userJobType = CType(value, JobTypeName) End Set End Property
[Personalizable(), WebBrowsable(), WebDisplayName("Job Type"), WebDescription("Select the category that corresponds to your job.")] public JobTypeName UserJobType { get { object o = ViewState["UserJobType"]; if (o != null) return (JobTypeName)o; else return _userJobType; } set { _userJobType = (JobTypeName)value; } }


System.Attribute
System.Web.UI.WebControls.WebParts.WebDisplayNameAttribute


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に収録されているすべての辞書からWebDisplayNameAttribute クラスを検索する場合は、下記のリンクをクリックしてください。

- WebDisplayNameAttribute クラスのページへのリンク