New to Telerik UI for WinForms? Start a free 30-day trial

Displays a calendar week or the configured working-week days, aligned to the current culture.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.Scheduler.dll

Syntax:

C#
public class SchedulerWeekView : SchedulerDayViewBase, INotifyPropertyChanged, IDisposable, ISupportShowWeekend

Inheritance: objectSchedulerViewSchedulerDayViewBaseSchedulerWeekView

Implements: IDisposableINotifyPropertyChangedISupportShowWeekend

Inherited Members SchedulerDayViewBase.GetPreviousView(NavigationStepTypes, int)SchedulerDayViewBase.GetNextView(NavigationStepTypes, int)SchedulerDayViewBase.GetEndDate(DateTime)SchedulerDayViewBase.GetDateForColumn(int)SchedulerDayViewBase.GetDateForColumn(int, RadScheduler)SchedulerDayViewBase.GetDateForCell(int, int, RadScheduler)SchedulerDayViewBase.GetDateForCell(int, int)SchedulerDayViewBase.GetColumnForDate(DateTime)SchedulerDayViewBase.GetNumberOfCellsPerHour()SchedulerDayViewBase.GetRowsCount()SchedulerDayViewBase.IsWorkingDay(DayOfWeek)SchedulerDayViewBase.IsWorkTime(DateTime)SchedulerDayViewBase.Dispose()SchedulerDayViewBase.RulerStartScaleMinutesSchedulerDayViewBase.RulerEndScaleMinutesSchedulerDayViewBase.WorkTimeExceptionsSchedulerDayViewBase.WorkWeekStartSchedulerDayViewBase.WorkWeekEndSchedulerDayViewBase.DefaultTimeZoneSchedulerDayViewBase.AutoScrollToWorkTimeSchedulerDayViewBase.RulerScaleSizeSchedulerDayViewBase.RulerFormatStringsSchedulerDayViewBase.WorkTimeSchedulerDayViewBase.ShowRulerSchedulerDayViewBase.RulerStartScaleSchedulerDayViewBase.RulerEndScaleSchedulerDayViewBase.RulerWidthSchedulerDayViewBase.TimeZonesSchedulerDayViewBase.RangeFactorSchedulerDayViewBase.CurrentTimeSchedulerDayViewBase.ShowAllDayAreaSchedulerDayViewBase.CanSetDayCountSchedulerView.nullableStartDateSchedulerView.IsAllDayEvent(IEvent)SchedulerView.CreateView(SchedulerViewType)SchedulerView.UpdateAppointments(ObservableCollection<IEvent>)SchedulerView.AddAppointment(IEvent)SchedulerView.RemoveAppointment(IEvent)SchedulerView.AppointmentChanged(IEvent, string)SchedulerView.IsViewInAccessibleInterval(DateTime)SchedulerView.IsDateInView(DateTime)SchedulerView.IsAppointmentInView(IEvent)SchedulerView.IsResourceIntersectsWithViewResources(IEvent)SchedulerView.AddResources(SchedulerResourceCollection)SchedulerView.GetResources()SchedulerView.GetResource()SchedulerView.GetResourceId()SchedulerView.OffsetView(int)SchedulerView.GetViewContainingDate(DateTime, int)SchedulerView.GetPreviousView()SchedulerView.GetNextView()SchedulerView.GetPreviousViewWithAppointments(IEnumerable<IEvent>)SchedulerView.CalculatePreviousView(IEnumerable<IEvent>, DateTime)SchedulerView.GetNextViewWithAppointments(IEnumerable<IEvent>)SchedulerView.CalculateNextDate(IEnumerable<IEvent>, ref DateTime)SchedulerView.GetFirstAppointment()SchedulerView.GetLastAppointment()SchedulerView.SetDefaultTimeZone(SchedulerTimeZone)SchedulerView.OnPropertyChanged(params string[])SchedulerView.OffsetTimeSpanSchedulerView.StartDateSchedulerView.CurrentDateSchedulerView.NameSchedulerView.VisibleSchedulerView.ReadOnlySchedulerView.GroupSeparatorWidthSchedulerView.AllowResourcesScrollingSchedulerView.ResourcesPerViewSchedulerView.SchedulerSchedulerView.AppointmentsSchedulerView.AppointmentTitleFormatSchedulerView.EndDateSchedulerView.ShowHeaderSchedulerView.AllowToolTipsSchedulerView.AllowAppointmentResizeSchedulerView.AllowAppointmentMoveSchedulerView.CellToolTipFormatSchedulerView.PropertyChanged...

Constructors

Initializes a new instance of the SchedulerWeekView class.

C#
public SchedulerWeekView()

Initializes the view by aligning startDate to the calendar week or working week.

C#
public SchedulerWeekView(DateTime startDate, bool showWeekend)
Parameters:startDateDateTime

A date used to determine the displayed week.

showWeekendbool

true to display all seven calendar days; otherwise, display the configured working-week days.

Properties

Gets the number of displayed days: seven when weekends are shown, or the inclusive configured workweek length otherwise. Assignments are ignored.

C#
[Browsable(false)]
public override int DayCount { get; set; }
Property Value:

The calculated number of visible days.

Overrides: SchedulerDayViewBase.DayCount

Gets or sets a value indicating whether weekend days are shown.

C#
public virtual bool ShowWeekend { get; set; }
Property Value:

true if weekend days are shown; otherwise, false.

Implements: ISupportShowWeekend.ShowWeekend

Gets the type of the view.

C#
public override SchedulerViewType ViewType { get; }
Property Value:

The type of the view.

Overrides: SchedulerView.ViewType

Methods

Aligns a date to the culture's first day of the week, or to WorkWeekStart when weekends are hidden.

C#
protected virtual DateTime CalculateCorrectStartDate(DateTime date)
Parameters:dateDateTime

The date to align.

Returns:

DateTime

The first displayed date for that week.

Copies the base view settings and the weekend-visibility setting to another week view.

C#
protected override void CopyPropertiesToView(SchedulerView other)
Parameters:otherSchedulerView

The view receiving the settings.

Overrides: SchedulerDayViewBase.CopyPropertiesToView(SchedulerView)

Creates a week view beginning at the specified date while retaining this view's settings.

C#
protected override SchedulerView CreateViewWithStartDate(DateTime startDate)
Parameters:startDateDateTime

The date used to determine the new view's week.

Returns:

SchedulerView

The new week view.

Overrides: SchedulerDayViewBase.CreateViewWithStartDate(DateTime)

Creates a view shifted forward by the specified number of seven-day weeks.

C#
public override SchedulerView GetNextView(int offset)
Parameters:offsetint

The signed number of weeks; positive values move forward and negative values move backward.

Returns:

SchedulerView

The next week view.

Overrides: SchedulerDayViewBase.GetNextView(int)

Creates a view shifted backward by the specified number of seven-day weeks.

C#
public override SchedulerView GetPreviousView(int offset)
Parameters:offsetint

The signed number of weeks; positive values move backward and negative values move forward.

Returns:

SchedulerView

The previous week view.

Overrides: SchedulerDayViewBase.GetPreviousView(int)

Uses the base view lookup with a seven-day calendar span to select the week for a date. When weekends are hidden, the returned view may not display the requested weekend date.

C#
public override SchedulerView GetViewContainingDate(DateTime date)
Parameters:dateDateTime

The date to locate.

Returns:

SchedulerView

The current or a newly created view for the date's week.

Overrides: SchedulerDayViewBase.GetViewContainingDate(DateTime)

Aligns a requested start date to the first day of the displayed week and remembers the request when that aligned date changes, allowing it to be realigned if the culture or weekend setting changes.

C#
protected override bool SetStartDate(DateTime value)
Parameters:valueDateTime

The requested date used to determine the displayed week.

Returns:

bool

true if the aligned start date changed; otherwise, false.

Overrides: SchedulerView.SetStartDate(DateTime)

Re-aligns the remembered requested date when scheduler, culture, or weekend visibility changes, and refreshes appointments when the scheduler or culture changes.

C#
protected override void UpdateOnPropertyChange(string propertyName)
Parameters:propertyNamestring

The name of the changed property.

Overrides: SchedulerDayViewBase.UpdateOnPropertyChange(string)