WebBrowsableAttribute クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
Web パーツ コントロールの指定されたプロパティが PropertyGridEditorPart オブジェクトに表示されるかどうかを示します。
public ref class WebBrowsableAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Property)]
public sealed class WebBrowsableAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Property)>]
type WebBrowsableAttribute = class
inherit Attribute
Public NotInheritable Class WebBrowsableAttribute
Inherits Attribute
- 継承
- 属性
例
次のコード例では、 WebBrowsableAttribute 属性を使用して、Web パーツ コントロールのプロパティを PropertyGridEditorPart コントロールに表示可能としてマークする方法を示します。 この例は、 PropertyGridEditorPart クラスの概要にあるより大きな例の一部です。
[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; }
}
<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
注釈
PropertyGridEditorPart コントロールには、ユーザーがWebPartおよびWebPartZoneBase ゾーンに配置されたサーバー コントロールのカスタム プロパティを編集できる汎用ユーザー インターフェイス (UI) が用意されています。 編集 UI は、ソース コードで (WebBrowsableAttribute クラスの) WebBrowsable属性でマークされているプロパティに対して提供されます。 プロパティがこの属性でマークされている場合、 PropertyGridEditorPart コントロールは、プロパティの型に基づいて編集 UI を作成し、必要に応じて PropertyDescriptor オブジェクトを使用して、各編集コントロールの値をプロパティの型に変換します。
コンストラクター
| 名前 | 説明 |
|---|---|
| WebBrowsableAttribute() |
WebBrowsableAttribute プロパティを Browsable に設定して、 |
| WebBrowsableAttribute(Boolean) |
Browsable プロパティの指定した値を使用して、WebBrowsableAttribute クラスの新しいインスタンスを初期化します。 |
フィールド
| 名前 | 説明 |
|---|---|
| Default |
Browsable プロパティが既定値 ( |
| No |
Browsable プロパティが |
| Yes |
Browsable プロパティが |
プロパティ
| 名前 | 説明 |
|---|---|
| Browsable |
PropertyGridEditorPart コントロールに Web パーツ コントロールの特定のプロパティを表示するかどうかを示す値を取得します。 |
| TypeId |
派生クラスで実装されている場合は、この Attributeの一意の識別子を取得します。 (継承元 Attribute) |
メソッド
| 名前 | 説明 |
|---|---|
| Equals(Object) |
このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。 |
| GetHashCode() |
表示名の値のハッシュ コードを返します。 |
| GetType() |
現在のインスタンスの Type を取得します。 (継承元 Object) |
| IsDefaultAttribute() |
現在のインスタンスが既定値に設定されているかどうかを判断します。 |
| Match(Object) |
派生クラスでオーバーライドされた場合、このインスタンスが指定したオブジェクトと等しいかどうかを示す値を返します。 (継承元 Attribute) |
| MemberwiseClone() |
現在の Objectの簡易コピーを作成します。 (継承元 Object) |
| ToString() |
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |
明示的なインターフェイスの実装
| 名前 | 説明 |
|---|---|
| _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) |
一連の名前を対応する一連のディスパッチ識別子に割り当てます。 (継承元 Attribute) |
| _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) |
インターフェイスの型情報を取得するために使用できるオブジェクトの型情報を取得します。 (継承元 Attribute) |
| _Attribute.GetTypeInfoCount(UInt32) |
オブジェクトが提供する型情報インターフェイスの数 (0 または 1) を取得します。 (継承元 Attribute) |
| _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) |
オブジェクトによって公開されるプロパティとメソッドへのアクセスを提供します。 (継承元 Attribute) |