Login.CheckBoxStyle Properti
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.
Mendapatkan referensi ke Style objek yang menentukan pengaturan untuk kotak centang Ingat Saya.
public:
property System::Web::UI::WebControls::TableItemStyle ^ CheckBoxStyle { System::Web::UI::WebControls::TableItemStyle ^ get(); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
public System.Web.UI.WebControls.TableItemStyle CheckBoxStyle { get; }
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
member this.CheckBoxStyle : System.Web.UI.WebControls.TableItemStyle
Public ReadOnly Property CheckBoxStyle As TableItemStyle
Nilai Properti
Referensi ke Style yang menentukan pengaturan gaya untuk Login kotak centang Ingat Saya kontrol.
- Atribut
Contoh
Contoh kode berikut mengatur warna teks kotak centang Ingat Saya menjadi biru dan gaya font menjadi miring dengan mengatur properti objek yang dirujuk Style oleh CheckBoxStyle properti .
<%@ Page Language="C#" AutoEventWireup="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
void Page_Load(Object sender, EventArgs e)
{
Login1.CheckBoxStyle.ForeColor = System.Drawing.Color.Blue;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Login id="Login1" runat="server">
<CheckBoxStyle Font-Italic="True"></CheckBoxStyle>
</asp:Login>
</form>
</body>
</html>
<%@ Page Language="VB" AutoEventWireup="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Login1.CheckBoxStyle.ForeColor = System.Drawing.Color.Blue
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>ASP.NET Example</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Login id="Login1" runat="server">
<CheckBoxStyle Font-Italic="True"></CheckBoxStyle>
</asp:Login>
</form>
</body>
</html>
Keterangan
Properti CheckBoxStyle mendapatkan referensi ke Style objek yang Anda gunakan untuk mengubah tampilan Login kotak centang Ingat Saya kontrol.
Properti ini bersifat baca-saja; namun, Anda dapat mengatur properti objek yang Style dikembalikannya. Anda dapat mengatur properti ini secara deklaratif dalam formulir Property-Subproperty
, di mana Subproperty
mewakili properti Style kelas (misalnya, CheckBoxStyle-ForeColor
). Anda dapat mengatur properti secara terprogram dalam formulir Property.Subproperty
(misalnya, CheckBoxStyle.ForeColor
).
Pengaturan umum mencakup warna latar belakang kustom, warna teks, dan properti font. Properti CheckBoxStyle mendefinisikan tampilan RememberMeText properti .
Pengaturan gaya untuk CheckBoxStyle properti digabungkan dengan pengaturan gaya untuk Login kontrol. Pengaturan apa pun yang CheckBoxStyle dibuat di properti mengambil alih pengaturan yang sesuai di properti Login kontrol.
Properti gaya kontrol berikut Login ini ditimpa oleh CheckBoxStyle pengaturan:
Saat Anda menggunakan templat untuk menentukan tampilan Login kontrol, CheckBoxStyle properti tidak berpengaruh.
Berlaku untuk
Lihat juga
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