Share via


WebBrowsableAttribute コンストラクター

定義

WebBrowsableAttribute クラスの新しいインスタンスを初期化します。

オーバーロード

WebBrowsableAttribute()

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

WebBrowsableAttribute(Boolean)

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

WebBrowsableAttribute()

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

public:
 WebBrowsableAttribute();
public WebBrowsableAttribute ();
Public Sub New ()

次のコード例では、 属性を WebBrowsableAttribute 使用して、Web パーツ コントロールのプロパティをコントロールに表示できるものとしてマークする方法を PropertyGridEditorPart 示します。 プロパティは、コンストラクターを介して WebBrowsableAttribute ブロウズ可能として設定されます。 この例は、クラスの概要に記載されているより大きな例の 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

注釈

コンストラクターはWebBrowsableAttribute、C# または <WebBrowsable()> Visual Basic の属性宣言[WebBrowsable()]を通じて属性が適用されるときにWebBrowsable使用されます。

適用対象

WebBrowsableAttribute(Boolean)

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

public:
 WebBrowsableAttribute(bool browsable);
public WebBrowsableAttribute (bool browsable);
new System.Web.UI.WebControls.WebParts.WebBrowsableAttribute : bool -> System.Web.UI.WebControls.WebParts.WebBrowsableAttribute
Public Sub New (browsable As Boolean)

パラメーター

browsable
Boolean

プロパティを PropertyGridEditorPart に表示するかどうかを示すブール値。

注釈

コンストラクターは WebBrowsableAttribute 、属性がブール値を WebBrowsable 持つ属性宣言を通じて適用されるときに使用されます。 プロパティがコントロールにPropertyGridEditorPart表示されないように、プロパティを C# または <WebBrowsable(false)> Visual Basic の 属性[WebBrowsable(false)]でマークできます。

適用対象