Public Interface ISPCalendarSettings
Dim instance As ISPCalendarSettings
public interface ISPCalendarSettings
The Microsoft.SharePoint.WebControls.ISPCalendarSettings interface to enforce exposed common properties related to Calendars. An ISPCalendarSettings object provides a typed representation of all the settings related to a Calender.
The member properties exposed by this interface are:
AlternateCalendarType – SPCalendarType representing the alternate to the CalendarType property, such as Hijri, Hebrew, or othersCalendarType - SPCalendarType representing the calendar typeDisplayItemFormUrl – string representing the Url to the Display PageForm of the calendarEditItemFormUrl – string representing the Url to the Edit PageForm of the calendarFirstDayOfWeek - integer representing the first day of the week incremenetHijriAdjustment – integer representing the value to synchronize Hijiri adjustmentsLocaleId – integer representing the calendar LocaleNewItemFormUrl - string representing the Url to the New PageForm of the calendarSelectedDate – string representing the selected dateTime24 – Boolean representing whether the day is specified in 24 hour formatTimeZoneSpan – TimeSpan representing the days time interval of the current calendarViewName – string representing the calendar default view nameWorkDayEndHour – short representing the ending hour for a calendar work dayWorkDayStartHour - short representing the starting hour for a calendar work dayWorkWeek – string representing a seven character string to indicate work days in a week
The most useful scenario for the use of ISPCalendarSettings is when building custom class similar to Microsoft.SharePoint.WebControls.SPCalendarContainer which provides to support for calendar views.
The primary usage of ISPCalendarSettings is internal, represented within the shipped software in both SPCalendarBase and SPCalendarContainer to expose calendar settings. Within custom development it is feasible to inherit from the ISPCalendarSettings interface to support the development of custom calendar containers (similar to SPCalendarContainer) which can later be used within custom calendar views inheriting from DataBoundControl.
In the below, the abstract MyClass is inheriting from ISPCalendarSettings interface, and implementing all the required member properties with relevant backing fields allowing them to be manipulated before the interface is used as a base class for a custom calendar container class. Since the class is marked as abstract, further behavior can be defined to package more implementation tools.
public abstract class MyClass : ISPCalendarSettings { public abstract string ViewName { get; set; } public abstract string SelectedDate { get; set; } public abstract string NewItemFormUrl { get; set; } public abstract string EditItemFormUrl { get; set; } public abstract string DisplayItemFormUrl { get; set; } public abstract int LocaleId { get; } public abstract SPCalendarType CalendarType { get; } public abstract SPCalendarType AlternateCalendarType { get; } public abstract bool Time24 { get; } public abstract int FirstDayOfWeek { get; } public abstract string WorkWeek { get; } public abstract int HijriAdjustment { get; } public abstract TimeSpan TimeZoneSpan { get; } public abstract short WorkDayStartHour { get; } public abstract short WorkDayEndHour { get; } }
Public MustInherit Class [MyClass] Implements ISPCalendarSettings Public MustOverride Property ViewName() As String Public MustOverride Property SelectedDate() As String Public MustOverride Property NewItemFormUrl() As String Public MustOverride Property EditItemFormUrl() As String Public MustOverride Property DisplayItemFormUrl() As String Public MustOverride ReadOnly Property LocaleId() As Integer Public MustOverride ReadOnly Property CalendarType() As SPCalendarType Public MustOverride ReadOnly Property AlternateCalendarType() As SPCalendarType Public MustOverride ReadOnly Property Time24() As Boolean Public MustOverride ReadOnly Property FirstDayOfWeek() As Integer Public MustOverride ReadOnly Property WorkWeek() As String Public MustOverride ReadOnly Property HijriAdjustment() As Integer Public MustOverride ReadOnly Property TimeZoneSpan() As TimeSpan Public MustOverride ReadOnly Property WorkDayStartHour() As Short Public MustOverride ReadOnly Property WorkDayEndHour() As ShortEnd Class