Search
DateStyle.Style Property
See Also
 






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

Namespace: MindFusion.Scheduling
Assembly: MindFusion.Scheduling

 Syntax

C#  Copy Code

public Style Style { get; set; }

Visual Basic  Copy Code

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

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 = Colors.LightBlue;
style.Style.BorderLeftWidth = 1;
style.Style.BorderTopColor = Colors.LightBlue;
style.Style.BorderTopWidth = 1;
style.Style.BorderRightColor = Colors.SteelBlue;
style.Style.BorderRightWidth = 1;
style.Style.BorderBottomColor = Colors.SteelBlue;
style.Style.BorderBottomWidth = 1;
calendar.DayStyles.Add(style);

Visual Basic  Copy Code

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 = Colors.LightBlue
style.Style.BorderLeftWidth = 1
style.Style.BorderTopColor = Colors.LightBlue
style.Style.BorderTopWidth = 1
style.Style.BorderRightColor = Colors.SteelBlue
style.Style.BorderRightWidth = 1
style.Style.BorderBottomColor = Colors.SteelBlue
style.Style.BorderBottomWidth = 1
calendar.DayStyles.Add(style)

 See Also