TitleFormat Enum
Definition
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.
Specifies the title format for the displayed month in the Calendar control.
public enum class TitleFormat
public enum TitleFormat
type TitleFormat =
Public Enum TitleFormat
- Inheritance
Fields
| Name | Value | Description |
|---|---|---|
| Month | 0 | Displays the title with the month but not the year (for example, "January"). |
| MonthYear | 1 | Displays the title with both the month and the year (for example, "January 2000"). |
Examples
The following code example demonstrates how to change the calendar title from the default format (MonthYear) to the Month format. To run the example, create a Web Forms page named WebForm1, and replace the Page_load method with the example code.
private void Page_Load(object sender, System.EventArgs e)
{
// Change the title format of Calendar1.
Calendar1.TitleFormat = TitleFormat.Month;
}
Private Sub Page_Load(sender As Object, e As System.EventArgs)
' Change the title format of Calendar1.
Calendar1.TitleFormat = TitleFormat.Month
End Sub
<%@ Page Language="C#" AutoEventWireup="True" %>
Calendar TitleFormat Example
<%@ Page Language="VB" AutoEventWireup="True" %>
Calendar TitleFormat Example
Remarks
The TitleFormat enumeration represents the different title formats for the Calendar control.