MindFusion.Scheduling for Silverlight Programmer's Guide
Calendar.DateTimeFormat Property
See Also
 





Gets or sets the DateTimeFormatInfo object that specifies how to format and display all dates within the calendar.

Namespace: MindFusion.Scheduling.Silverlight
Assembly: MindFusion.Scheduling.Silverlight

 Syntax

C#  Copy Code

public DateTimeFormatInfo DateTimeFormat { get; set; }

Visual Basic  Copy Code

Public Property DateTimeFormat As DateTimeFormatInfo

 Property Value

An instance of the .NET DateTimeFormatInfo class.

 Remarks

If this property is not set, the calendar uses the DateFormatInfo from the associated Culture.

 Note

Setting various subproperties of this property is transparent for the Calendar control and in order to update the control, you should enclose the property sets in a BeginInit/EndInit block. See the example section below for illustration.

 Example

The following example demonstrates how to properly set various properties of the DateTimeFormat property. The example code assumes that calendar is a variable identifying existing Calendar instance.

C#  Copy Code

calendar.BeginInit();
calendar.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Monday;
calendar.EndInit();

Visual Basic  Copy Code
calendar.BeginInit()
calendar.DateTimeFormat.FirstDayOfWeek = DayOfWeek.Monday
calendar.EndInit()

 See Also

Calendar Members
Calendar Class
MindFusion.Scheduling.Silverlight Namespace
Culture Property