LexEPoX / how-to-partially-color-the-appointment-rectangle-to-indicate-task-progress-e969

.NET, XtraScheduler Suite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Files to look at:

How to partially color the appointment rectangle to indicate task progress

Scheduler appointments can represent tasks to be completed. If you are informed about the progress of a task, you may wish to indicate it with color. 
To accomplish this, handle the CustomDrawAppointmentBackground event. Use the e.ObjectInfo property to get access to the AppointmentViewInfo object, containing information about the appointment being displayed. The InnerBounds property provides the coordinates of the appointment body rectangle.
An appointment can extend beyond the visible area. To determine which part of the appointment is shown on the screen, the HasLeftBorder and HasRightBorder properties are evaluated. Using the AppointmentInterval and Interval properties of the AppointmentViewInfo object,  the dimensions of hidden and visible parts can be calculated.
Note that you should set the SnapToCellsMode property to Never, to calculate the visible part of the appointment more accurately.
The SchedulerControl of the sample application is shown in the picture below.

 


About

.NET, XtraScheduler Suite

License:Other


Languages

Language:C# 100.0%