Calendar
ConsoleMonster.Widgets
A Gregorian month or year with dated outcomes, ISO weeks and a status legend. Never reads input.
Inheritance
- object
- Calendar
Usage
Explore 20 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 10
- Extension method Calendar.WithCulture
- Extension method Calendar.WithFirstDayOfWeek
- Extension method Calendar.WithShowLegend
- Extension method Calendar.WithToday
- Extension method Calendar.WithView
- Method CalendarFluent.WithCulture
- Method CalendarFluent.WithFirstDayOfWeek
- Method CalendarFluent.WithShowLegend
- Method CalendarFluent.WithToday
- Method CalendarFluent.WithView
Accepted by parameters 10
- Extension method Calendar.WithCulture
- Extension method Calendar.WithFirstDayOfWeek
- Extension method Calendar.WithShowLegend
- Extension method Calendar.WithToday
- Extension method Calendar.WithView
- Method CalendarFluent.WithCulture
- Method CalendarFluent.WithFirstDayOfWeek
- Method CalendarFluent.WithShowLegend
- Method CalendarFluent.WithToday
- Method CalendarFluent.WithView
Constructors
public Calendar(int year, int month, IEnumerable<CalendarMark>? marks = null) #Creates a calendar for an explicit month and a snapshot of its marked days.
Parameters
- year int
- month int
- marks System.Collections.Generic.IEnumerable<ConsoleMonster.Dates.CalendarMark>? = null
public Calendar(int year, int month, CalendarData data) #Creates a display over a shared date model, suitable for reuse by a picker.
Parameters
- year int
- month int
- data ConsoleMonster.Dates.CalendarData
Methods
public Size Measure(Constraints constraints, RenderContext context) #Returns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
public void Render(Region region, RenderContext context) #Renders into a region. The region may be smaller or larger than the measured size.
Parameters
- region ConsoleMonster.Canvas.Region
- The target region.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Inherited Methods
Properties
public DayOfWeek? FirstDayOfWeek { get; set; } #Override for the culture's first day of week.
public CultureInfo? Culture { get; set; } #Explicit display culture; null uses the render context. Arithmetic and displayed years remain Gregorian.
public bool ShowLegend { get; set; } #Whether the legend follows the displayed period. Defaults to true.
public DateTime? Today { get; set; } #The civil date to emphasize as today; null leaves all dates neutral.
Extension Methods
public static Calendar WithCulture(Calendar calendar, CultureInfo? value) #Sets Calendar.Culture: Explicit display culture; null uses the render context. Arithmetic and displayed years remain Gregorian.
Parameters
- calendar ConsoleMonster.Widgets.Calendar
- The instance.
- value System.Globalization.CultureInfo?
- The value.
public static Calendar WithFirstDayOfWeek(Calendar calendar, DayOfWeek? value) #Sets Calendar.FirstDayOfWeek: Override for the culture's first day of week.
Parameters
- calendar ConsoleMonster.Widgets.Calendar
- The instance.
- value System.DayOfWeek?
- The value.
public static Calendar WithShowLegend(Calendar calendar, bool value = true) #Sets Calendar.ShowLegend: Whether the legend follows the displayed period. Defaults to true.
Parameters
- calendar ConsoleMonster.Widgets.Calendar
- The instance.
- value bool = true
- The value (default true).
public static Calendar WithToday(Calendar calendar, DateTime? value) #Sets Calendar.Today: The civil date to emphasize as today; null leaves all dates neutral.
Parameters
- calendar ConsoleMonster.Widgets.Calendar
- The instance.
- value System.DateTime?
- The value.
public static Calendar WithView(Calendar calendar, CalendarView value) #Sets Calendar.View: Month or year presentation.
Parameters
- calendar ConsoleMonster.Widgets.Calendar
- The instance.
- value ConsoleMonster.Widgets.CalendarView
- The value.