PocketPlanner Programmer's Guide

DateStyle.Style Property

See Also

Gets or sets the visualization style of the date cells included in the formatted range.

Namespace: MindFusion.Scheduling.Compact
Assembly: PocketPlanner

 Syntax

C#

public Style Style { get; set; }

Visual Basic

Public Property Style As Style

 Property Value

A Style object that defines the appearance of time cells included in the specified interval.

 Remarks

Only the properties in this Style object that have been explicitly set would be used. See the example section below for more detail.

 Example

The following example creates a custom style for the dates in the range 03/20 - 03/24. The style changes only the border color and the border width of the cells in the specified range. The values of all other properties are retrieved from the default settings, because they are never explicitly set in this custom style.

C#

DateStyle style = new DateStyle();
style.From = new DateTime(2006, 3, 20);
style.To = new DateTime(2006, 3, 24);
style.Style = new Style();
style.Style.BorderLeftColor = Color.LightBlue;
style.Style.BorderLeftWidth = 1;
style.Style.BorderTopColor = Color.LightBlue;
style.Style.BorderTopWidth = 1;
style.Style.BorderRightColor = Color.SteelBlue;
style.Style.BorderRightWidth = 1;
style.Style.BorderBottomColor = Color.SteelBlue;
style.Style.BorderBottomWidth = 1;
calendar.DayStyles.Add(style);

Visual Basic

Dim style As New DateStyle()
style.From = New DateTime(2006, 3, 20)
style.To = New DateTime(2006, 3, 24)
style.Style = New Style()
style.Style.BorderLeftColor = Color.LightBlue
style.Style.BorderLeftWidth = 1
style.Style.BorderTopColor = Color.LightBlue
style.Style.BorderTopWidth = 1
style.Style.BorderRightColor = Color.SteelBlue
style.Style.BorderRightWidth = 1
style.Style.BorderBottomColor = Color.SteelBlue
style.Style.BorderBottomWidth = 1
calendar.DayStyles.Add(style)

 See Also