Creating Custom Areas
To assist the developer in formatting blocks of time within dbicDayView control time grid, the control contains support for CustomAreas. Custom areas are defined by a start and end time and can be used to provide coloring, filtering (Contact, Location, or Task), or "Dead Zone" formatting.
Using the CustomArea class
The custom area class consists of the following properties..
BackColor : Background color of the area
ContactID :The contact ID filter
Daily :Determines if the area occurs daily
DeadZone :Determines if the area is a dead zone
End :The ending time for the area
LocationID :The location ID filter
Start :The starting time for the area
TaskID :The task ID filter
It is possible to create a custom area at design time, or we can create one through code. For instance..
<VB.NET>
Dim dtStart As DateTime
Dim dtEnd As DateTime
dtStart = New DateTime(2026, 8, 15, 1, 30, 0)
dtEnd = New DateTime(2026, 8, 15, 2, 0, 0)
Dim objColor As New Dbi.PIM.dbiCustomArea(dtStart, dtEnd, Color.Red)
dbicDayView1.CustomAreas.Add(objColor)
<C#>
DateTime dtStart;
DateTime dtEnd;
dtStart = new DateTime(2026, 8, 15, 1, 30, 0);
dtEnd = new DateTime(2026, 8, 15, 2, 0, 0);
Dbi.PIM.dbiCustomArea objColor = new Dbi.PIM.dbiCustomArea(dtStart, dtEnd, Color.Red);dbicDayView1.CustomAreas.Add(objColor);
Daily Areas
Setting the Daily property of the CustomArea to true creates a single CustomArea that is repeated for each day in the dbicDayView control.
Creating Dead Zones
A dead zone is an area where an appointment cannot be created on, or moved into.
NOTE: Dead zones apply only to appointments in the time grid, they do not apply to multiple day appointments.
NOTE: Dead zones only apply to appointments created or changed through user interaction. Dead zones have no effect on appointments being added or changed through code. It is the responsibility of the programmer to determine if an appointment conflicts with a dead zone using the InDeadZone method of the dbicDayView control.