PocketPlanner Programmer's Guide

ListViewSettings.SubTitleFormat Property

See Also

Gets or sets a string used to format the cells subtitles.

Namespace: MindFusion.Scheduling.Compact
Assembly: PocketPlanner

 Syntax

C#

public string SubTitleFormat { get; set; }

Visual Basic

Public Property SubTitleFormat As String

 Property Value

A string specifying the display format. Assign null (Nothing in Visual Basic) to this property to use the corresponding value from the current theme.

 Remarks

The format specifiers that can be used in the format string are listed in the MSDN's DateTimeFormatInfo class topic. Additionally, the "w1" format specifier can be used to display only the first letter of the day of the week (that is, 'M' for Monday, 'T' for Tuesday, and so on). This specifier cannot be combined with other specifiers, it can be used only by its own.

 Example

The following example demonstrates how to setup a List view to display a week in each cell and the days of the week in the subheader. The example assumes that the variable calendar references an existing Calendar instance.

C#

calendar.CurrentView = CalendarView.List;
calendar.ListViewSettings.CellUnits = TimeUnit.Week;
calendar.ListViewSettings.CellSettings.HeaderPosition = Position.None;
calendar.ListViewSettings.TitleFormat = "dd, MMM";
calendar.ListViewSettings.Orientation = MindFusion.Scheduling.Compact.Orientation.Horizontal;
calendar.ListViewSettings.HeaderStyle = ListViewHeaderStyles.Subheader |
    ListViewHeaderStyles.SubheaderPerCell | ListViewHeaderStyles.Title;
calendar.ListViewSettings.SubHeaderDivisions = 7;
calendar.ListViewSettings.SubTitleFormat = "w1";

Visual Basic

calendar.CurrentView = CalendarView.List
calendar.ListViewSettings.CellUnits = TimeUnit.Week
calendar.ListViewSettings.CellSettings.HeaderPosition = Position.None
calendar.ListViewSettings.TitleFormat = "dd, MMM"
calendar.ListViewSettings.Orientation = MindFusion.Scheduling.Compact.Orientation.Horizontal
calendar.ListViewSettings.HeaderStyle = ListViewHeaderStyles.Subheader Or _
    ListViewHeaderStyles.SubheaderPerCell Or ListViewHeaderStyles.Title
calendar.ListViewSettings.SubHeaderDivisions = 7
calendar.ListViewSettings.SubTitleFormat = "w1"

 See Also