Aracılığıyla paylaş


WebBrowsableAttribute Oluşturucular

Tanım

WebBrowsableAttribute sınıfının yeni bir örneğini başlatır.

Aşırı Yüklemeler

WebBrowsableAttribute()

özelliği olarak ayarlanmış trueşekilde Browsable sınıfının yeni bir örneğini WebBrowsableAttribute başlatır.

WebBrowsableAttribute(Boolean)

özelliği için belirtilen değerle sınıfının yeni bir örneğini WebBrowsableAttributeBrowsable başlatır.

WebBrowsableAttribute()

özelliği olarak ayarlanmış trueşekilde Browsable sınıfının yeni bir örneğini WebBrowsableAttribute başlatır.

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

Örnekler

Aşağıdaki kod örneği, Web Bölümleri denetimindeki WebBrowsableAttribute bir özelliği denetimde görüntülenmek üzere kullanılabilir olarak işaretlemek için özniteliğinin nasıl kullanılacağını PropertyGridEditorPart gösterir. özelliği oluşturucu aracılığıyla WebBrowsableAttribute göz atılabilir olarak ayarlanır. Bu örnek, sınıfa genel bakış bölümünde PropertyGridEditorPart bulunan daha büyük bir örneğin bir parçasıdır.

[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

Açıklamalar

OluşturucuWebBrowsableAttribute, öznitelik C# veya <WebBrowsable()> Visual Basic'te öznitelik bildirimi [WebBrowsable()] aracılığıyla uygulandığında kullanılırWebBrowsable.

Şunlara uygulanır

WebBrowsableAttribute(Boolean)

özelliği için belirtilen değerle sınıfının yeni bir örneğini WebBrowsableAttributeBrowsable başlatır.

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)

Parametreler

browsable
Boolean

özelliğinin içinde görüntülenip görüntülenmeyeceğini belirten boole PropertyGridEditorPartdeğeri.

Açıklamalar

WebBrowsableAttribute Oluşturucu, öznitelik bir Boole değeriyle öznitelik bildirimi aracılığıyla uygulandığında kullanılırWebBrowsable. Bir özelliğin bir PropertyGridEditorPart denetimde görüntülenmesini önlemek için özelliği C# veya <WebBrowsable(false)> Visual Basic'te özniteliğiyle [WebBrowsable(false)] işaretlenebilir.

Şunlara uygulanır