WebBrowsableAttribute Construtores
Definição
Inicializa uma nova instância da classe WebBrowsableAttribute.Initializes a new instance of the WebBrowsableAttribute class.
Sobrecargas
| WebBrowsableAttribute() |
Inicializa uma nova instância da classe WebBrowsableAttribute com a propriedade Browsable definida como |
| WebBrowsableAttribute(Boolean) |
Inicializa uma nova instância da classe WebBrowsableAttribute com o valor especificado para a propriedade Browsable.Initializes a new instance of the WebBrowsableAttribute class with the specified value for the Browsable property. |
WebBrowsableAttribute()
Inicializa uma nova instância da classe WebBrowsableAttribute com a propriedade Browsable definida como true.Initializes a new instance of the WebBrowsableAttribute class with the Browsable property set to true.
public:
WebBrowsableAttribute();
public WebBrowsableAttribute ();
Public Sub New ()
Exemplos
O exemplo de código a seguir demonstra como usar o WebBrowsableAttribute atributo para marcar uma propriedade em um controle de Web Parts como disponível para ser exibido em um PropertyGridEditorPart controle.The following code example demonstrates how to use the WebBrowsableAttribute attribute to mark a property on a Web Parts control as available to be displayed in a PropertyGridEditorPart control. A propriedade é definida como navegável por meio do WebBrowsableAttribute Construtor.The property is set as browsable through the WebBrowsableAttribute constructor. Este exemplo é parte de um exemplo maior encontrado na PropertyGridEditorPart visão geral da classe.This example is part of a larger example found in the PropertyGridEditorPart class overview.
[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
Comentários
O WebBrowsableAttribute Construtor é usado quando o WebBrowsable atributo é aplicado por meio da declaração de atributo [WebBrowsable()] em C# ou <WebBrowsable()> em Visual Basic.The WebBrowsableAttribute constructor is used when the WebBrowsable attribute is applied through the attribute declaration [WebBrowsable()] in C# or <WebBrowsable()> in Visual Basic.
Aplica-se a
WebBrowsableAttribute(Boolean)
Inicializa uma nova instância da classe WebBrowsableAttribute com o valor especificado para a propriedade Browsable.Initializes a new instance of the WebBrowsableAttribute class with the specified value for the Browsable property.
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)
Parâmetros
- browsable
- Boolean
Um valor booliano que indica se a propriedade deve ser exibida em um PropertyGridEditorPart.A Boolean value indicating whether the property should be displayed in a PropertyGridEditorPart.
Comentários
O WebBrowsableAttribute Construtor é usado quando o WebBrowsable atributo é aplicado por meio da declaração de atributo com um valor booliano.The WebBrowsableAttribute constructor is used when the WebBrowsable attribute is applied through the attribute declaration with a Boolean value. Para impedir que uma propriedade seja exibida em um PropertyGridEditorPart controle, a propriedade pode ser marcada com o atributo [WebBrowsable(false)] em C# ou <WebBrowsable(false)> em Visual Basic.To prevent a property from being displayed in a PropertyGridEditorPart control, the property could be marked with the attribute [WebBrowsable(false)] in C# or <WebBrowsable(false)> in Visual Basic.