Calendar.SelectorStyle Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the style properties for the week and month selector column.
public:
property System::Web::UI::WebControls::TableItemStyle ^ SelectorStyle { System::Web::UI::WebControls::TableItemStyle ^ get(); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
public System.Web.UI.WebControls.TableItemStyle SelectorStyle { get; }
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
member this.SelectorStyle : System.Web.UI.WebControls.TableItemStyle
Public ReadOnly Property SelectorStyle As TableItemStyle
A TableItemStyle that contains the style properties for the week and month selector column. The default value is an empty TableItemStyle.
- Attributes
The following code example demonstrates how to use the SelectorStyle property to specify a light gray background color for the selector column.
<%@ 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"
SelectionMode="DayWeekMonth"
SelectMonthText="<*>"
SelectWeekText="->">
<SelectorStyle BackColor="LightGray">
</SelectorStyle>
</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"
SelectionMode="DayWeekMonth"
SelectMonthText="<*>"
SelectWeekText="->">
<SelectorStyle BackColor="LightGray">
</SelectorStyle>
</asp:Calendar>
</form>
</body>
</html>
Use this property to specify the style for the week and month selector column. For more information on the different style properties that can be controlled, see TableItemStyle.
The SelectorStyle property applies only when the SelectionMode property is set to CalendarSelectionMode.DayWeek
or CalendarSelectionMode.DayWeekMonth
.
Produk | Versi |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET maklum balas
.NET ialah projek sumber terbuka. Pilih pautan untuk memberikan maklum balas: