WebBrowsableAttribute クラス

定義

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
属性

次のコード例では、 属性を 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、ユーザーがゾーンに配置されたWebPartZoneBaseサーバー コントロールと でWebPartカスタム プロパティを編集できるようにする汎用ユーザー インターフェイス (UI) が用意されています。 編集 UI は、(クラスの) 属性を使用 WebBrowsable してソース コードでマークされているプロパティに対して WebBrowsableAttribute 提供されます。 プロパティがこの属性でマークされている場合、 PropertyGridEditorPart コントロールはプロパティの型に基づいて編集 UI を作成し、必要に応じて オブジェクトを使用 PropertyDescriptor して各編集コントロールの値を プロパティの型に変換します。

コンストラクター

WebBrowsableAttribute()

WebBrowsableAttribute プロパティを true に設定して、Browsable クラスの新しいインスタンスを初期化します。

WebBrowsableAttribute(Boolean)

WebBrowsableAttribute プロパティの指定した値を使用して、Browsable クラスの新しいインスタンスを初期化します。

フィールド

Default

WebBrowsableAttribute プロパティが既定値 (false) に設定されている Browsable クラスのインスタンスを表します。

No

WebBrowsableAttribute プロパティが false に設定されている Browsable クラスのインスタンスを表します。

Yes

WebBrowsableAttribute プロパティが true に設定されている 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)

適用対象