WebBrowsableAttribute Oluşturucular

Tanım

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

Aşırı Yüklemeler

Name Description
WebBrowsableAttribute()

özelliği olarak ayarlanmış WebBrowsableAttributeşekilde Browsable sınıfının yeni bir örneğini true 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ış WebBrowsableAttributeşekilde Browsable sınıfının yeni bir örneğini true 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 PropertyGridEditorPart görüntülenmek üzere kullanılabilir olarak işaretlemek için özniteliğinin nasıl kullanılacağını 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 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

WebBrowsableAttribute oluşturucu, WebBrowsable özniteliği C# içinde [WebBrowsable()] veya Visual Basic'de <WebBrowsable()> öznitelik bildirimi aracılığıyla uygulandığında kullanılır.

Ş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 gösteren Boole PropertyGridEditorPartdeğeri.

Açıklamalar

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

Şunlara uygulanır