Search
ListViewSettings.SubHeaderDivisions Property
See Also
 






Gets or sets the number of divisions in the sub-header.

Namespace: MindFusion.Scheduling
Assembly: MindFusion.Scheduling

 Syntax

C#  Copy Code

public int SubHeaderDivisions { get; set; }

Visual Basic  Copy Code

Public Property SubHeaderDivisions As Integer

 Property Value

An integer value specifying the number of cells in the subheader. Assign -1 to this property to use the corresponding value from the current theme.

 Remarks

The value of this property is used only when the subheader of the List view is displayed (as specified by the HeaderStyle property). The value specifies the number of cells in the subheader. The date in each cell is calculated automatically and is displayed according to the SubTitleFormat property.

 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#  Copy Code

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.WinForms.Orientation.Horizontal;
calendar.ListViewSettings.HeaderStyle = ListViewHeaderStyles.Subheader |
    ListViewHeaderStyles.SubheaderPerCell | ListViewHeaderStyles.Title;
calendar.ListViewSettings.SubHeaderDivisions = 7;
calendar.ListViewSettings.SubTitleFormat = "w1";

Visual Basic  Copy Code

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.WinForms.Orientation.Horizontal
calendar.ListViewSettings.HeaderStyle = ListViewHeaderStyles.Subheader Or _
    ListViewHeaderStyles.SubheaderPerCell Or ListViewHeaderStyles.Title
calendar.ListViewSettings.SubHeaderDivisions = 7
calendar.ListViewSettings.SubTitleFormat = "w1"

 See Also