CalendarExtensions
Namespace: Hex1b
Assembly: Hex1b.dll
Extension methods for creating instances using the fluent builder API.
public static class CalendarExtensionsInheritance
Object → CalendarExtensions
Methods
Calendar<TParent>(WidgetContext<TParent>, DateOnly)
Creates a calendar widget displaying the specified month.
Parameters:
ctx(WidgetContext<<TParent>>): The parent widget context.month(DateOnly): The month to display. Only the Year and Month components are used.
Returns: CalendarWidget
A configured .
public static CalendarWidget Calendar<TParent>(this WidgetContext<TParent> ctx, DateOnly month) where TParent : Hex1bWidgetCalendar<TParent>(WidgetContext<TParent>, int, int)
Creates a calendar widget displaying the specified year and month.
Parameters:
ctx(WidgetContext<<TParent>>): The parent widget context.year(Int32): The year.month(Int32): The month (1-12).
Returns: CalendarWidget
A configured .
public static CalendarWidget Calendar<TParent>(this WidgetContext<TParent> ctx, int year, int month) where TParent : Hex1bWidgetCalendar<TParent>(WidgetContext<TParent>)
Creates a calendar widget displaying the current month.
Parameters:
ctx(WidgetContext<<TParent>>): The parent widget context.
Returns: CalendarWidget
A configured .
public static CalendarWidget Calendar<TParent>(this WidgetContext<TParent> ctx) where TParent : Hex1bWidgetCompact(CalendarWidget)
Enables compact mode (no gridlines). Ideal for embedding in a DatePicker.
Parameters:
widget(CalendarWidget):
Returns: CalendarWidget
public static CalendarWidget Compact(this CalendarWidget widget)Day(CalendarWidget, Func<CalendarDayContext, Hex1bWidget?>)
Provides a callback to build custom content for each day cell. The callback receives a with information about the day and returns an optional widget rendered alongside the day number.
Parameters:
widget(CalendarWidget): The calendar widget.builder(Func<CalendarDayContext, Hex1bWidget>): A callback that receives day context and returns optional content.
Returns: CalendarWidget
A configured .
public static CalendarWidget Day(this CalendarWidget widget, Func<CalendarDayContext, Hex1bWidget?> builder)FirstDayOfWeek(CalendarWidget, DayOfWeek)
Sets the first day of the week for the calendar layout.
Parameters:
widget(CalendarWidget):firstDay(DayOfWeek):
Returns: CalendarWidget
public static CalendarWidget FirstDayOfWeek(this CalendarWidget widget, DayOfWeek firstDay)HighlightCurrent(CalendarWidget)
Enables highlighting of the current day with theme colors from and .
Parameters:
widget(CalendarWidget):
Returns: CalendarWidget
public static CalendarWidget HighlightCurrent(this CalendarWidget widget)ShowHeader(CalendarWidget, bool)
Sets whether to display the day-of-week header row.
Parameters:
widget(CalendarWidget):show(Boolean):
Returns: CalendarWidget
public static CalendarWidget ShowHeader(this CalendarWidget widget, bool show)Today(CalendarWidget, DateOnly)
Sets the "today" date used for highlighting the current day.
Parameters:
widget(CalendarWidget):today(DateOnly):
Returns: CalendarWidget
public static CalendarWidget Today(this CalendarWidget widget, DateOnly today)