PocketPlanner Programmer's Guide

ResourceViewSettings.VisibleEndTime Property

See Also

Gets or sets the last visible time of displayed days.

Namespace: MindFusion.Scheduling.Compact
Assembly: PocketPlanner

 Syntax

C#

public TimeSpan VisibleEndTime { get; set; }

Visual Basic

Public Property VisibleEndTime As TimeSpan

 Property Value

A .NET TimeSpan value indicating the last visible hour of the day in a ResourceView.

 Remarks

This property along with the VisibleStartTime property determine the range of hours displayed in a resource view for each day. The rest of the day is filtered (that is, the hours outside this range are not displayed). Despite being a TimeSpan, only the Hour component is taken into consideration when filtering. Furthermore, this setting only works if the Unit property of the bottom timeline is set to Hour and the UnitCount is set to 1 or if Unit is set to Minute.

 Example

The following example demonstrates how to use filtering in a resource view. The example assumes that calendar references an existing Calendar object.

C#

// Enable resource view
calendar.ResourceViewSettings.Timelines = 2;
calendar.ResourceViewSettings.BottomTimelineSettings.Unit = TimeUnit.Hour;
calendar.ResourceViewSettings.BottomTimelineSettings.Format = "h:mm";
calendar.ResourceViewSettings.MiddleTimelineSettings.Unit = TimeUnit.Day;
calendar.ResourceViewSettings.MiddleTimelineSettings.Format = "d ddd";

// Show only work days from 9 to 18
calendar.ResourceViewSettings.HiddenDays = DaysOfWeek.Saturday | DaysOfWeek.Sunday;
calendar.ResourceViewSettings.VisibleStartTime = TimeSpan.FromHours(9);
calendar.ResourceViewSettings.VisibleEndTime = TimeSpan.FromHours(18);

// Set appropriate scroll step
calendar.ResourceViewSettings.ScrollStep = TimeSpan.FromHours(1);

Visual Basic

' Enable resource view
calendar.ResourceViewSettings.Timelines = 2
calendar.ResourceViewSettings.BottomTimelineSettings.Unit = TimeUnit.Hour
calendar.ResourceViewSettings.BottomTimelineSettings.Format = "h:mm"
calendar.ResourceViewSettings.MiddleTimelineSettings.Unit = TimeUnit.Day
calendar.ResourceViewSettings.MiddleTimelineSettings.Format = "d ddd"

' Show only work days from 9 to 18
calendar.ResourceViewSettings.HiddenDays = DaysOfWeek.Saturday Or DaysOfWeek.Sunday
calendar.ResourceViewSettings.VisibleStartTime = TimeSpan.FromHours(9)
calendar.ResourceViewSettings.VisibleEndTime = TimeSpan.FromHours(18)

' Set appropriate scroll step
calendar.ResourceViewSettings.ScrollStep = TimeSpan.FromHours(1)

 See Also