Custom Drawing OpenNETCF Calendar Controls

If you have been using the OpenNETCF Calendar Controls or are thinking if giving it a spin, you may have wondered how  you can customize the cells in the MonthView control.

Basically there are two events in the BaseCalendar control named DrawLabel and GetLabel. With GetLabel you just return a string that you want to display in the cell.  With DrawLabel you can custom draw the cell.  Say you want to display an alarm on a certain date (like the image below), then you would use DrawLabel. 

You can download the evaluation version of the Calendar Controls which includes a sample project. Just replace the MonthDemo.cs file in the sample application with this modified version of MonthDemo.cs.  Also, here is the alarm.bmp I use.  Just add it to the project as an embedded resource.


alarm.bmp (.39 KB)

MonthDemo.cs (2.93 KB)

Warning: count(): Parameter must be an array or an object that implements Countable in /home/usnbis1maldq/domains/ on line 405

Leave a Reply