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

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

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

WebDescriptionAttribute 属性を使用して Web パーツ コントロールのプロパティにツールヒントを割り当てる方法のコード例を次に示します。カスタム UserJobType プロパティにツールヒント "ジョブに対応するカテゴリを選択します" を指定し、PropertyGridEditorPart コントロールに表示します。この例は 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.WebDescriptionAttribute


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


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