WebBrowsableAttribute Konstruktor
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Menginisialisasi instans baru kelas WebBrowsableAttribute.
Overload
WebBrowsableAttribute() |
Menginisialisasi instans WebBrowsableAttribute baru kelas dengan properti yang Browsable diatur ke |
WebBrowsableAttribute(Boolean) |
Menginisialisasi instans WebBrowsableAttribute baru kelas dengan nilai yang ditentukan untuk Browsable properti . |
WebBrowsableAttribute()
Menginisialisasi instans WebBrowsableAttribute baru kelas dengan properti yang Browsable diatur ke true
.
public:
WebBrowsableAttribute();
public WebBrowsableAttribute ();
Public Sub New ()
Contoh
Contoh kode berikut menunjukkan cara menggunakan WebBrowsableAttribute atribut untuk menandai properti pada kontrol Komponen Web sebagai tersedia untuk ditampilkan dalam PropertyGridEditorPart kontrol. Properti diatur sebagai dapat dijelajahi WebBrowsableAttribute melalui konstruktor. Contoh ini adalah bagian dari contoh yang lebih besar yang ditemukan dalam PropertyGridEditorPart gambaran umum kelas.
[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
Keterangan
WebBrowsableAttribute Konstruktor digunakan saat WebBrowsable
atribut diterapkan melalui deklarasi [WebBrowsable()]
atribut di C# atau <WebBrowsable()>
di Visual Basic.
Berlaku untuk
WebBrowsableAttribute(Boolean)
Menginisialisasi instans WebBrowsableAttribute baru kelas dengan nilai yang ditentukan untuk Browsable properti .
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)
Parameter
- browsable
- Boolean
Nilai Boolean yang menunjukkan apakah properti harus ditampilkan dalam PropertyGridEditorPart.
Keterangan
WebBrowsableAttribute Konstruktor digunakan saat WebBrowsable
atribut diterapkan melalui deklarasi atribut dengan nilai Boolean. Untuk mencegah properti ditampilkan dalam PropertyGridEditorPart kontrol, properti dapat ditandai dengan atribut [WebBrowsable(false)]
di C# atau <WebBrowsable(false)>
di Visual Basic.
Berlaku untuk
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk