New to Telerik UI for WPFStart a free 30-day trial

Represents definition of a view that shows 42 days in month view mode.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.ScheduleView.dll

Syntax:

C#
public class MonthViewDefinition : ViewDefinitionBase, INotifyPropertyChanged, ISlotConvertor

Inheritance: objectViewDefinitionBaseMonthViewDefinition

Implements: INotifyPropertyChangedISlotConvertor

Inherited Members ViewDefinitionBase.CalendarWeekRulePropertyViewDefinitionBase.StretchGroupHeadersPropertyViewDefinitionBase.TitlePropertyViewDefinitionBase.LargeChangeIntervalPropertyViewDefinitionBase.SmallChangeIntervalPropertyViewDefinitionBase.DayEndTimePropertyViewDefinitionBase.DayStartTimePropertyViewDefinitionBase.VisibleDaysPropertyViewDefinitionBase.FirstDayOfWeekPropertyViewDefinitionBase.MinTimeRulerExtentPropertyViewDefinitionBase.MaxTimeRulerExtentPropertyViewDefinitionBase.SubGroupsFilterPropertyViewDefinitionBase.GroupFilterPropertyViewDefinitionBase.AppointmentFilterPropertyViewDefinitionBase.OccurrenceFilterPropertyViewDefinitionBase.TimerulerMajorTickStringFormatPropertyViewDefinitionBase.SlotGenarationBehaviorPropertyViewDefinitionBase.SnapBehaviorPropertyViewDefinitionBase.ToString()ViewDefinitionBase.FormatWeekGroupHeaderName(IFormatProvider, IList<DateTime>, int)ViewDefinitionBase.GetShowWeekGroupHeaders()ViewDefinitionBase.GetVisibleRangeEnd(DateTime, CultureInfo, DayOfWeek?)ViewDefinitionBase.GetGroupDescriptions()ViewDefinitionBase.OnPropertyChanged(string)ViewDefinitionBase.OnPropertyChanged<T>(Expression<Func<T>>)ViewDefinitionBase.OnPropertyChanged(PropertyChangedEventArgs)ViewDefinitionBase.CalendarWeekRuleViewDefinitionBase.StretchGroupHeadersViewDefinitionBase.TitleViewDefinitionBase.LargeChangeIntervalViewDefinitionBase.SmallChangeIntervalViewDefinitionBase.FirstDayOfWeekViewDefinitionBase.VisibleDaysViewDefinitionBase.DayEndTimeViewDefinitionBase.DayStartTimeViewDefinitionBase.MinTimeRulerExtentViewDefinitionBase.MaxTimeRulerExtentViewDefinitionBase.SubGroupsFilterViewDefinitionBase.GroupFilterViewDefinitionBase.AppointmentFilterViewDefinitionBase.OccurrenceFilterViewDefinitionBase.TimerulerMajorTickStringFormatViewDefinitionBase.SlotGenarationBehaviorViewDefinitionBase.SnapBehaviorViewDefinitionBase.ShowTimeRulerViewDefinitionBase.PropertyChanged...

Constructors

C#
public MonthViewDefinition()

Fields

Identifies the AllowCustomAppointmentSize property.

C#
public static readonly DependencyProperty AllowCustomAppointmentSizeProperty
Field Value:

The identifier for the AllowCustomAppointmentSize property.

Identifies the GroupHeaderDateStringFormat property.

C#
public static readonly DependencyProperty GroupHeaderDateStringFormatProperty
Field Value:

The identifier for the GroupHeaderDateStringFormat property.

Identifies the TimerulerGroupStringFormat property.

C#
public static readonly DependencyProperty TimerulerGroupStringFormatProperty
Field Value:

The identifier for the TimerulerGroupStringFormat property.

Properties

Gets or sets boolean value to indicate if appointments can have different size.

C#
public bool AllowCustomAppointmentSize { get; set; }

Gets the Date group descriptor for MonthViewDefinition.

C#
protected override DateGroupDescription DateGroupDescription { get; }

Overrides: ViewDefinitionBase.DateGroupDescription

Gets or sets the format that will be applied on GroupHeader control for date time.

C#
public string GroupHeaderDateStringFormat { get; set; }

Gets or sets the format that will be applied on the time ruler of each group.

C#
public string TimerulerGroupStringFormat { get; set; }

Methods

Creates a new instance of the MonthViewDefinition class.

C#
protected override Freezable CreateInstanceCore()
Returns:

Freezable

The new instance.

Creates the recurring slot for MonthViewDefinition.

C#
protected override Slot CreateRecurringSlot(IDateSpan anchor, IDateSpan current, DayOfWeek firstDayOfWeek)
Parameters:anchorIDateSpancurrentIDateSpanfirstDayOfWeekDayOfWeek

The first day of week.

Returns:

Slot

The recurring slot.

Overrides: ViewDefinitionBase.CreateRecurringSlot(IDateSpan, IDateSpan, DayOfWeek)

If group name is DateTime this method formats the group name using the GroupHeaderDateStringFormat.

C#
protected override string FormatGroupHeaderName(IFormatProvider formatInfo, object groupName)
Parameters:formatInfoIFormatProvider

The format info provider to be used for formatting.

groupNameobject

The group name to format.

Returns:

string

The formatted group name.

Overrides: ViewDefinitionBase.FormatGroupHeaderName(IFormatProvider, object)

Formats the string that represents the current visible range.

C#
protected override string FormatVisibleRangeText(IFormatProvider formatInfo, DateTime rangeStart, DateTime rangeEnd, DateTime currentDate)
Parameters:formatInfoIFormatProvider

The format info provider to be used for formatting.

rangeStartDateTime

The start of the visible range.

rangeEndDateTime

The end of the visible range.

currentDateDateTime

The current date.

Returns:

string

The formatted string to be displayed as current visible range.

Overrides: ViewDefinitionBase.FormatVisibleRangeText(IFormatProvider, DateTime, DateTime, DateTime)

Creates new instance of FixedTickProvider.

C#
protected ITickProvider GetGroupTickLength()
Returns:

ITickProvider

Gets the length of the major ticks. This value is a provider object that might be auto tick length provider, constant tick length provider or a custom tick length provider.

C#
protected override sealed ITickProvider GetMajorTickLength()
Returns:

ITickProvider

The length of the major ticks.

Overrides: ViewDefinitionBase.GetMajorTickLength()

Gets the maximum size of the time ruler in pixels.

C#
protected override double GetMaxTimeRulerExtent(double defaultValue)
Parameters:defaultValuedouble

The default value, provided by the ScheduleView.

Returns:

double

The minimum size of the time ruler in pixels.

Overrides: ViewDefinitionBase.GetMaxTimeRulerExtent(double)

Remarks:

The returned value determines the maximum size of the time ruler in pixels. MaxTimeRulerExtent of 1400 pixels means that the time ruler will be rendered with no more than 1400 pixels no matter how much time it represents. If there is less than 1400 pixels available, it will be squeezed as much as the value returned from the GetMinTimeRulerExtent method allows to.

Gets the length of the minor ticks. This value is a provider object that might be auto tick length provider, constant tick length provider or a custom tick length provider.

C#
protected override sealed ITickProvider GetMinorTickLength()
Returns:

ITickProvider

The length of the minor ticks. The default value is 1 day.

Overrides: ViewDefinitionBase.GetMinorTickLength()

Gets the minimum size of the time ruler in pixels.

C#
protected override double GetMinTimeRulerExtent(double defaultValue)
Parameters:defaultValuedouble

The default value, provided by the ScheduleView.

Returns:

double

The minimum size of the time ruler in pixels.

Overrides: ViewDefinitionBase.GetMinTimeRulerExtent(double)

Remarks:

The returned value determines the minimum size of the time ruler in pixels. MinTimeRulerExtent of 1400 pixels means that the time ruler will be rendered with at least 1400 pixels no matter how much time it represents. If there is more than 1400 pixels available, it will be stretched as much as the value returned from the GetMaxTimeRulerExtent method allows to.

GetOrientation()

Orientation

Gets the Orientation of the ViewDefinition.

C#
public override Orientation GetOrientation()
Returns:

Orientation

Horizontal Orientation only.

Overrides: ViewDefinitionBase.GetOrientation()

Calculated the visible range start using the current date (passed as parameter), a culture and if provided, a specific first day of week.

C#
protected override DateTime GetVisibleRangeStart(DateTime dateTime, CultureInfo culture, DayOfWeek? firstDayOfWeek)
Parameters:dateTimeDateTime

The current date to be used to calculate the visible range start.

cultureCultureInfo

The culture to be used to calculate the visible range start.

firstDayOfWeekDayOfWeek?

The first day of week that overrides the one, provided by the culture.

Returns:

DateTime

The visible range start for the corresponding current date, culture and first day of week.

Overrides: ViewDefinitionBase.GetVisibleRangeStart(DateTime, CultureInfo, DayOfWeek?)

Remarks:

For example the WeekViewDefinition "snaps" to weeks. That means that it will always provide as visible range start a date, that is the first day of the week which contains the current date and this first day will be the same day of week as the provided one. If no firstDayOfWeek is provided, the value from the culture is used. Example: If the first day of week is Monday and the current date is 2010/10/29 the result will be 2010/10/25.

Prepares the specified element to display the specified item.

C#
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters:elementDependencyObject

Element used to display the specified item.

itemobject

Specified item.

Overrides: ViewDefinitionBase.PrepareContainerForItemOverride(DependencyObject, object)