Search
ResourceViewSettings.HiddenDays Property
See Also
 





Gets or sets the days of the week that should not be displayed in a resource view.

Namespace: MindFusion.Scheduling.WinForms
Assembly: MindFusion.Scheduling

 Syntax

C#  Copy Code

public DaysOfWeek HiddenDays { get; set; }

Visual Basic  Copy Code

Public Property HiddenDays As DaysOfWeek

 Property Value

A member of the DaysOfWeek enumeration indicating the visible days in a ResourceView.

 Remarks

This property determines which days should be filtered (that is, not displayed) in a resource view. This setting only works if the Unit of the bottom timeline is set to Day or Hour.

 Example

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

C#  Copy Code

// 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  Copy Code

' 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