Calendar.NextPrevStyle Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Sonraki ve önceki ay gezinti öğelerinin stil özelliklerini alır.
public:
property System::Web::UI::WebControls::TableItemStyle ^ NextPrevStyle { System::Web::UI::WebControls::TableItemStyle ^ get(); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
public System.Web.UI.WebControls.TableItemStyle NextPrevStyle { get; }
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
member this.NextPrevStyle : System.Web.UI.WebControls.TableItemStyle
Public ReadOnly Property NextPrevStyle As TableItemStyle
Özellik Değeri
Sonraki ve önceki ay gezinti öğelerinin stil özellikleri. Varsayılan değer boş TableItemStylebir değerdir.
- Öznitelikler
Örnekler
Aşağıdaki kod örneği, özelliğinin NextPrevStyle sonraki ay ve önceki ay gezinti denetimleri için mavi metin belirtmek üzere nasıl kullanılacağını gösterir.
<%@ Page Language="C#" AutoEventWireup="True" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Calendar Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3>Calendar Example</h3>
<asp:Calendar id="calendar1" runat="server"
ShowNextPrevMonth="True"
NextPrevFormat="ShortMonth">
<NextPrevStyle ForeColor="Blue">
</NextPrevStyle>
</asp:Calendar>
</form>
</body>
</html>
<%@ Page Language="VB" AutoEventWireup="True" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Calendar Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3>Calendar Example</h3>
<asp:Calendar id="calendar1" runat="server"
ShowNextPrevMonth="True"
NextPrevFormat="ShortMonth">
<NextPrevStyle ForeColor="Blue">
</NextPrevStyle>
</asp:Calendar>
</form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="True" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<script runat="server" >
void Selection_Change(Object sender, EventArgs e)
{
// Set the background color for the next and previous
// month controls in the Calendar.
Calendar1.NextPrevStyle.BackColor =
System.Drawing.Color.FromName(ColorList.SelectedItem.Value);
}
</script>
<head runat="server">
<title> Calendar NextPrevStyle Example </title>
</head>
<body>
<form id="form1" runat="server">
<h3> Calendar NextPrevStyle Example </h3>
Select a background color for the next and previous month controls
in the calendar.
<br /><br />
<asp:Calendar id="Calendar1"
ShowGridLines="True"
ShowTitle="True"
runat="server"/>
<br /><br />
<table cellpadding="5">
<tr>
<td>
Background color:
</td>
</tr>
<tr>
<td>
<asp:DropDownList id="ColorList"
AutoPostBack="True"
OnSelectedIndexChanged="Selection_Change"
runat="server">
<asp:ListItem Value="White"> White </asp:ListItem>
<asp:ListItem Selected="True" Value="Silver"> Silver </asp:ListItem>
<asp:ListItem Value="DarkGray"> Dark Gray </asp:ListItem>
<asp:ListItem Value="Khaki"> Khaki </asp:ListItem>
<asp:ListItem Value="DarkKhaki"> Dark Khaki </asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</form>
</body>
</html>
<%@ Page Language="VB" AutoEventWireup="True" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<script runat="server" >
Sub Selection_Change(sender As Object, e As EventArgs)
' Set the background color for the next and previous
' month controls in the Calendar.
Calendar1.NextPrevStyle.BackColor = _
System.Drawing.Color.FromName(ColorList.SelectedItem.Value)
End Sub
</script>
<head runat="server">
<title> Calendar NextPrevStyle Example </title>
</head>
<body>
<form id="form1" runat="server">
<h3> Calendar NextPrevStyle Example </h3>
Select a background color for the next and previous month controls
in the calendar.
<br /><br />
<asp:Calendar id="Calendar1"
ShowGridLines="True"
ShowTitle="True"
runat="server"/>
<br /><br />
<table cellpadding="5">
<tr>
<td>
Background color:
</td>
</tr>
<tr>
<td>
<asp:DropDownList id="ColorList"
AutoPostBack="True"
OnSelectedIndexChanged="Selection_Change"
runat="server">
<asp:ListItem Value="White"> White </asp:ListItem>
<asp:ListItem Selected="True" Value="Silver"> Silver </asp:ListItem>
<asp:ListItem Value="DarkGray"> Dark Gray </asp:ListItem>
<asp:ListItem Value="Khaki"> Khaki </asp:ListItem>
<asp:ListItem Value="DarkKhaki"> Dark Khaki </asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</form>
</body>
</html>
Açıklamalar
Sonraki ve önceki ay gezinti öğelerinin stilini belirtmek için bu özelliği kullanın. Denetlenebilecek farklı stil özellikleri hakkında daha fazla bilgi için bkz TableItemStyle. .
Bu özellik yalnızca ShowNextPrevMonth özelliği olarak ayarlandığında true
geçerlidir.