Class CalendarMonth
Draws a calendar for one month: the names of the days in the header font, a line under them, and the dates in the body font, each in a blue circle, in up to six weeks. The week starts on Sunday unless SetFirstDayOfWeek sets another day.
public class CalendarMonth : IDrawable
- Inheritance
-
CalendarMonth
- Implements
- Inherited Members
Constructors
CalendarMonth(Font, Font, int, int)
Creates a calendar for the specified month.
public CalendarMonth(Font f1, Font f2, int year, int month)
Parameters
f1Fontthe header font.
f2Fontthe body font.
yearintthe year.
monthintthe month, from 1 to 12.
Methods
DrawOn(Page)
Draws this calendar on the specified page. The line and the circles are drawn as an artifact, and the pen of the page is left as it was. Returns the x and y coordinates of the bottom right corner of the calendar.
public float[] DrawOn(Page page)
Parameters
pagePage
Returns
- float[]
SetBodyFont(Font)
Sets the body font.
public CalendarMonth SetBodyFont(Font font)
Parameters
fontFont
Returns
SetCellHeight(float)
Sets the height of the day cells.
public CalendarMonth SetCellHeight(float height)
Parameters
heightfloat
Returns
SetCellWidth(float)
Sets the width of the day cells.
public CalendarMonth SetCellWidth(float width)
Parameters
widthfloat
Returns
SetFirstDayOfWeek(DayOfWeek)
Sets the day the weeks start on, in the first column. The default is Sunday; many countries start the week on Monday.
public CalendarMonth SetFirstDayOfWeek(DayOfWeek day)
Parameters
dayDayOfWeek
Returns
SetHeadFont(Font)
Sets the header font.
public CalendarMonth SetHeadFont(Font font)
Parameters
fontFont
Returns
SetLocation(float, float)
Sets the location of the top left corner of the calendar.
public CalendarMonth SetLocation(float x, float y)