Calendar Class

A renderable calendar.
public sealed class Calendar : JustInTimeRenderable, IRenderable, IHasCulture, IHasTableBorder, 
    IHasBorder, IAlignable

Constructors

Calendar(DateTime)
Initializes a new instance of the Calendar class.
Calendar(int, int, int)
Initializes a new instance of the Calendar class.
Calendar(int, int)
Initializes a new instance of the Calendar class.

Properties

Justify? Alignment
Gets or sets the alignment.
TableBorder Border
Gets or sets the border.
Style BorderStyle
Gets or sets the box style.
IList<CalendarEvent> CalendarEvents
Gets a list containing all calendar events.
CultureInfo Culture
Gets or sets the calendar's CultureInfo.
int Day
Gets or sets the calendar day.
Style HeaderStyle
Gets or sets the header style.
Style HighlightStyle
Gets or sets the calendar's highlight Style.
int Month
Gets or sets the calendar month.
bool ShowHeader
Gets or sets a value indicating whether or not the calendar header should be shown.
bool UseSafeBorder
Gets or sets a value indicating whether or not to use a "safe" border on legacy consoles that might not be able to render non-ASCII characters.
int Year
Gets or sets the calendar year.

Methods

protected override IRenderable Build()
Builds the inner renderable.
protected virtual bool HasDirtyChildren()
Checks if there are any children that has changed. If so, the underlying renderable needs rebuilding.
protected void MarkAsDirty()
Marks this instance as dirty.
protected void MarkAsDirty(Action)
Marks this instance as dirty.
protected override Measurement Measure(RenderOptions, int)
Measures the renderable object.
protected override IEnumerable<Segment> Render(RenderOptions, int)
Renders the object.

Extension Methods

Calendar AddCalendarEvent(DateTime, Style)
Adds a calendar event.
Calendar AddCalendarEvent(int, int, int, Style)
Adds a calendar event.
Calendar AddCalendarEvent(string, DateTime, Style)
Adds a calendar event.
Calendar AddCalendarEvent(string, int, int, int, Style)
Adds a calendar event.
T Alignment<Calendar>(Justify?)
Sets the alignment for an IAlignable object.
T Ascii2Border<Calendar>()
Display another ASCII border.
T AsciiBorder<Calendar>()
Display an ASCII border.
T AsciiDoubleHeadBorder<Calendar>()
Display an ASCII border with a double header border.
T Border<Calendar>(TableBorder)
Sets the border.
T BorderColor<Calendar>(Color)
Sets the border color.
T BorderStyle<Calendar>(Style)
Sets the border style.
T Centered<Calendar>()
Sets the IAlignable object to be centered.
T Culture<Calendar>(CultureInfo)
Sets the culture.
T Culture<Calendar>(int)
Sets the culture.
T Culture<Calendar>(string)
Sets the culture.
T DoubleBorder<Calendar>()
Display a double border.
T DoubleEdgeBorder<Calendar>()
Display a border with a double edge.
IEnumerable<Segment> GetSegments(IAnsiConsole)
Gets the segments for a renderable using the specified console.
Calendar HeaderStyle(Style)
Sets the calendar's header Style.
T HeavyBorder<Calendar>()
Display a heavy border.
T HeavyEdgeBorder<Calendar>()
Display a border with a heavy edge.
T HeavyHeadBorder<Calendar>()
Display a border with a heavy header.
Calendar HideHeader()
Hides the calendar header.
Calendar HighlightStyle(Style)
Sets the calendar's highlight Style.
T HorizontalBorder<Calendar>()
Display a simple border.
T LeftAligned<Calendar>()
Sets the IAlignable object to be left aligned.
T MarkdownBorder<Calendar>()
Display a markdown border.
T MinimalBorder<Calendar>()
Display a minimal border.
T MinimalDoubleHeadBorder<Calendar>()
Display a minimal border with a double header border.
T MinimalHeavyHeadBorder<Calendar>()
Display a minimal border with a heavy head.
T NoBorder<Calendar>()
Do not display a border.
T NoSafeBorder<Calendar>()
Disables the safe border.
T RightAligned<Calendar>()
Sets the IAlignable object to be right aligned.
T RoundedBorder<Calendar>()
Display a rounded border.
T SafeBorder<Calendar>()
Enables the safe border.
Calendar ShowHeader()
Shows the calendar header.
T SimpleBorder<Calendar>()
Display a simple border.
T SimpleHeavyBorder<Calendar>()
Display a simple border with heavy lines.
T SquareBorder<Calendar>()
Display a square border.