Customizing Appearance in Windows Forms Scheduler
The Winforms Scheduler control provides extensive appearance customization options through the Appearance property. The ScheduleAppearance object exposes settings that allow you to customize colors, display formats, headers, navigation elements, time slots, visual styles, and various scheduler-specific UI elements.
This section explains how to customize the appearance of different Scheduler regions.
Customize Scheduler Colors
The Scheduler allows you to customize colors used for borders, text, grid lines, and other visual elements.
Customize the Selected Appointment Border
When an appointment is selected, the Scheduler displays a border around the item to indicate its selection state. The ClickItemBorderColor property defines the color of this border, making the selected appointment visually distinct from other appointments in the Scheduler.
using Syncfusion.Windows.Forms.Schedule;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
private readonly ScheduleControl scheduleControl;
public Form1()
{
InitializeComponent();
scheduleControl = new ScheduleControl();
scheduleControl.Appearance.ClickItemBorderColor = Color.Blue;
this.Controls.Add(scheduleControl);
}
}
}Imports Syncfusion.Windows.Forms.Schedule
Namespace WindowsFormsApplication1
Public Partial Class Form1
Private ReadOnly scheduleControl As ScheduleControl
Public Sub New()
InitializeComponent()
scheduleControl = New ScheduleControl()
scheduleControl.Appearance.ClickItemBorderColor = Color.Blue
Me.Controls.Add(scheduleControl)
End Sub
End Class
End NamespaceCustomize Drag-and-Drop Indicators
When an appointment is dragged, the Scheduler displays a visual indicator. The DragColor property specifies the color of this indicator during the drag-and-drop operation.
using Syncfusion.Windows.Forms.Schedule;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
private readonly ScheduleControl scheduleControl;
public Form1()
{
InitializeComponent();
scheduleControl = new ScheduleControl();
scheduleControl.Appearance.DragColor = Color.Green;
this.Controls.Add(scheduleControl);
}
}
}Imports Syncfusion.Windows.Forms.Schedule
Namespace WindowsFormsApplication1
Public Partial Class Form1
Private ReadOnly scheduleControl As ScheduleControl
Public Sub New()
InitializeComponent()
scheduleControl = New ScheduleControl()
scheduleControl.Appearance.DragColor = Color.Green
Me.Controls.Add(scheduleControl)
End Sub
End Class
End NamespaceCustomize Grid Line Colors
The SolidBorderColor property specifies the color of the grid lines displayed in the calendar within the navigation panel.
using Syncfusion.Windows.Forms.Schedule;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
private readonly ScheduleControl scheduleControl;
public Form1()
{
InitializeComponent();
scheduleControl = new ScheduleControl();
scheduleControl.Appearance.SolidBorderColor = Color.Green;
this.Controls.Add(scheduleControl);
}
}
}Imports Syncfusion.Windows.Forms.Schedule
Namespace WindowsFormsApplication1
Public Partial Class Form1
Private ReadOnly scheduleControl As ScheduleControl
Public Sub New()
InitializeComponent()
scheduleControl = New ScheduleControl()
scheduleControl.Appearance.SolidBorderColor = Color.Green
Me.Controls.Add(scheduleControl)
End Sub
End Class
End NamespaceCustomize the Caption Area
The Scheduler displays a caption bar at the top for navigation and date display.
Change the Caption Background Color
Use the CaptionBackColor property to customize the caption panel background.
using Syncfusion.Windows.Forms.Schedule;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
private readonly ScheduleControl scheduleControl;
public Form1()
{
InitializeComponent();
scheduleControl = new ScheduleControl();
scheduleControl.Appearance.CaptionBackColor = Color.Yellow;
this.Controls.Add(scheduleControl);
}
}
}Imports Syncfusion.Windows.Forms.Schedule
Namespace WindowsFormsApplication1
Public Partial Class Form1
Private ReadOnly scheduleControl As ScheduleControl
Public Sub New()
InitializeComponent()
scheduleControl = New ScheduleControl()
scheduleControl.Appearance.CaptionBackColor = Color.Yellow
Me.Controls.Add(scheduleControl)
End Sub
End Class
End NamespaceShow or Hide the Caption Bar
You can control caption visibility using the ShowCaption property.
using Syncfusion.Windows.Forms.Schedule;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
private readonly ScheduleControl scheduleControl;
public Form1()
{
InitializeComponent();
scheduleControl = new ScheduleControl();
scheduleControl.Appearance.ShowCaption = false;
this.Controls.Add(scheduleControl);
}
}
}Imports Syncfusion.Windows.Forms.Schedule
Namespace WindowsFormsApplication1
Public Partial Class Form1
Private ReadOnly scheduleControl As ScheduleControl
Public Sub New()
InitializeComponent()
scheduleControl = New ScheduleControl()
scheduleControl.Appearance.ShowCaption = False
Me.Controls.Add(scheduleControl)
End Sub
End Class
End NamespaceShow or Hide Navigation Buttons
Use the ShowCaptionButtons property to control the visibility of previous and next navigation buttons.
using Syncfusion.Windows.Forms.Schedule;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
private readonly ScheduleControl scheduleControl;
public Form1()
{
InitializeComponent();
scheduleControl = new ScheduleControl();
scheduleControl.Appearance.ShowCaptionButtons = false;
this.Controls.Add(scheduleControl);
}
}
}Imports Syncfusion.Windows.Forms.Schedule
Namespace WindowsFormsApplication1
Public Partial Class Form1
Private ReadOnly scheduleControl As ScheduleControl
Public Sub New()
InitializeComponent()
scheduleControl = New ScheduleControl()
scheduleControl.Appearance.ShowCaptionButtons = False
Me.Controls.Add(scheduleControl)
End Sub
End Class
End NamespaceWhen
ShowCaptionis set tofalse, the entire caption panel including navigation buttons is hidden.
Customize Header Appearance
The Scheduler displays date headers to identify the dates associated with the visible schedule. Header colors can be customized to improve readability and match the application’s theme.
Customize Week and Month Headers
Use the MonthWeekHeaderBackColor and MonthWeekHeaderForeColor properties to customize the background and text colors of headers displayed in Week and Month views.
scheduleControl.Appearance.MonthWeekHeaderBackColor = Color.LightSteelBlue;
scheduleControl.Appearance.MonthWeekHeaderForeColor = Color.DarkBlue;scheduleControl.Appearance.MonthWeekHeaderBackColor = Color.LightSteelBlue
scheduleControl.Appearance.MonthWeekHeaderForeColor = Color.DarkBlueCustomize WorkWeek Headers
Use the WorkWeekHeaderBackColor and WorkWeekHeaderForeColor properties to customize the appearance of headers in the WorkWeek view.
scheduleControl.Appearance.WorkWeekHeaderBackColor = Color.Gainsboro;
scheduleControl.Appearance.WorkWeekHeaderForeColor = Color.Black;scheduleControl.Appearance.WorkWeekHeaderBackColor = Color.Gainsboro
scheduleControl.Appearance.WorkWeekHeaderForeColor = Color.BlackCustomize the All-Day Row
The Scheduler includes a dedicated row for displaying all-day appointments. Use the AllDayBackColor property to customize the background color of this row.
scheduleControl.Appearance.AllDayBackColor = Color.Beige;scheduleControl.Appearance.AllDayBackColor = Color.BeigeCustomize Navigation Calendar Appearance
The navigation calendar provides a compact monthly view that can be used to browse and navigate dates within the Scheduler. Its appearance can be customized to match the application’s visual style.
Customize Calendar Colors
The following properties customize the overall appearance of the navigation calendar:
- NavigationCalendarBackColor - Specifies the background color of the navigation calendar.
- NavigationCalendarHeaderColor - Specifies the color of the header that displays the current month and year.
- NavigationCalendarTextColor - Specifies the color of date text displayed in the navigation calendar.
scheduleControl.Appearance.NavigationCalendarBackColor = Color.White;
scheduleControl.Appearance.NavigationCalendarHeaderColor = Color.SteelBlue;
scheduleControl.Appearance.NavigationCalendarTextColor = Color.Black;scheduleControl.Appearance.NavigationCalendarBackColor = Color.White
scheduleControl.Appearance.NavigationCalendarHeaderColor = Color.SteelBlue
scheduleControl.Appearance.NavigationCalendarTextColor = Color.BlackCustomize Date Highlighting
The navigation calendar provides dedicated appearance settings for selected dates, the current date, and disabled dates. Customizing these elements helps distinguish important dates and improves the overall navigation experience.
- NavigationCalendarSelectionColor - Specifies the color used for the selected date in the navigation calendar.
- NavigationCalendarTodayColor - Specifies the text color used for the current date.
- NavigationCalendarTodayBackColor - Specifies the background color of the current date.
- NavigationCalendarDisabledTextColor - Specifies the text color of dates that are unavailable or displayed in a disabled state.
scheduleControl.Appearance.NavigationCalendarSelectionColor = Color.CornflowerBlue;
scheduleControl.Appearance.NavigationCalendarTodayColor = Color.Red;
scheduleControl.Appearance.NavigationCalendarTodayBackColor = Color.LightYellow;
scheduleControl.Appearance.NavigationCalendarDisabledTextColor = Color.Gray;scheduleControl.Appearance.NavigationCalendarSelectionColor = Color.CornflowerBlue
scheduleControl.Appearance.NavigationCalendarTodayColor = Color.Red
scheduleControl.Appearance.NavigationCalendarTodayBackColor = Color.LightYellow
scheduleControl.Appearance.NavigationCalendarDisabledTextColor = Color.GrayCustomize Navigation Elements
The navigation calendar includes month navigation controls and week numbers that can be customized independently.
- NavigationCalendarArrowColor - Specifies the color of the navigation arrows used to move between months.
- NavigationCalendarWeekNumberColor - Specifies the color of week numbers displayed in the navigation calendar.
- NavigationCalendarStartDayOfWeek - Specifies which day appears as the first day of the week in the navigation calendar.
scheduleControl.Appearance.NavigationCalendarArrowColor = Color.SteelBlue;
scheduleControl.Appearance.NavigationCalendarWeekNumberColor = Color.DarkGray;
scheduleControl.Appearance.NavigationCalendarStartDayOfWeek = DayOfWeek.Monday;scheduleControl.Appearance.NavigationCalendarArrowColor = Color.SteelBlue
scheduleControl.Appearance.NavigationCalendarWeekNumberColor = Color.DarkGray
scheduleControl.Appearance.NavigationCalendarStartDayOfWeek = DayOfWeek.MondayCustomize Appointment Text Format
The Scheduler allows you to control the information displayed within appointment cells by using customizable format strings. Format strings can contain predefined tokens that are replaced with values from the corresponding appointment at runtime.
These format strings can be used to display appointment details such as the subject, location, owner, dates, times, and reminder information. The same set of tokens can be used when formatting standard appointments and multi-day appointments.
Supported Format Tokens
Supported Format Tokens
The following tokens can be used in appointment format strings:
- [subject] - Displays the appointment subject.
- [content] - Displays the appointment content or description.
- [location] - Displays the appointment location.
- [owner] - Displays the appointment owner.
- [label] - Displays the appointment label value.
- [marker] - Displays the appointment marker value.
- [reminder] - Displays the appointment reminder information.
- [allday] - Indicates whether the appointment is an all-day appointment.
- [start] - Displays the appointment start date and time.
- [end] - Displays the appointment end date and time.
- [startdate] - Displays the appointment start date.
- [enddate] - Displays the appointment end date.
- [starttime] - Displays the appointment start time.
- [endtime] - Displays the appointment end time.
Customize Date and Time Token Formatting
Date- and time-related tokens can be formatted using standard .NET format strings. These formatting settings are applied whenever the corresponding tokens are displayed in appointment text.
- DateFormat - Specifies the format used for date-only tokens such as [startdate] and [enddate].
- TimeFormat - Specifies the format used for time-only tokens such as [starttime] and [endtime].
- DateTimeFormat - Specifies the format used for date and time tokens such as [start] and [end].
scheduleControl.Appearance.DateFormat = "dd/MM/yyyy";
scheduleControl.Appearance.TimeFormat = "HH:mm";
scheduleControl.Appearance.DateTimeFormat = "dd/MM/yyyy HH:mm";scheduleControl.Appearance.DateFormat = "dd/MM/yyyy"
scheduleControl.Appearance.TimeFormat = "HH:mm"
scheduleControl.Appearance.DateTimeFormat = "dd/MM/yyyy HH:mm"Customize Appointment Display Formats
The Scheduler provides separate formatting properties for appointments displayed in different views. These properties determine how appointment information is rendered within appointment cells.
- DayItemFormat - Specifies the display format of appointments shown in Day and WorkWeek views.
- WeekMonthItemFormat - Specifies the display format of appointments shown in Week and Month views.
- AllDayItemFormat - Specifies the display format of all-day appointments.
scheduleControl.Appearance.DayItemFormat = "[subject] from [starttime] to [endtime]";
scheduleControl.Appearance.WeekMonthItemFormat = "[subject] from [starttime] to [endtime]";
scheduleControl.Appearance.AllDayItemFormat = "[subject] from [starttime] to [endtime]";scheduleControl.Appearance.DayItemFormat = "[subject] from [starttime] to [endtime]"
scheduleControl.Appearance.WeekMonthItemFormat = "[subject] from [starttime] to [endtime]"
scheduleControl.Appearance.AllDayItemFormat = "[subject] from [starttime] to [endtime]"The preceding example displays the appointment subject followed by its start and end times.
Customize Multi-Day Appointment Text
Appointments that span multiple days are rendered differently from standard appointments. The Scheduler provides separate formatting properties for different portions of a multi-day appointment span.
The following properties define the text displayed across different sections of a multi-day appointment:
- SpanItemFormatLeftText - Specifies the text displayed on the interior left side of a multi-day span.
- SpanItemFormatMiddleText - Specifies the text displayed in the middle of a multi-day span.
- SpanItemFormatRightText - Specifies the text displayed on the interior right side of a multi-day span.
- SpanItemFormatTerminalLeftText - Specifies the text displayed on the open left side of a multi-day span.
- SpanItemFormatTerminalRightText - Specifies the text displayed on the open right side of a multi-day span.
scheduleControl.Appearance.SpanItemFormatLeftText = "[subject]";
scheduleControl.Appearance.SpanItemFormatMiddleText = "[subject]";
scheduleControl.Appearance.SpanItemFormatRightText = "[subject]";
scheduleControl.Appearance.SpanItemFormatTerminalLeftText = "[subject]";
scheduleControl.Appearance.SpanItemFormatTerminalRightText = "[subject]";scheduleControl.Appearance.SpanItemFormatLeftText = "[subject]"
scheduleControl.Appearance.SpanItemFormatMiddleText = "[subject]"
scheduleControl.Appearance.SpanItemFormatRightText = "[subject]"
scheduleControl.Appearance.SpanItemFormatTerminalLeftText = "[subject]"
scheduleControl.Appearance.SpanItemFormatTerminalRightText = "[subject]"These properties use the same format tokens supported by standard appointment formats and enable different text to be displayed for various sections of a multi-day appointment span.
-
Format strings can contain both static text and tokens. Any text outside the token delimiters ([ and ]) is displayed as-is. For example, the format string “[subject] from [starttime] to [endtime]” renders the words from and to together with the appointment values.
-
To display a literal opening or closing bracket in a format string, use double brackets:
- [[ displays [
- ]] displays ]
Customize Header Formats
The Scheduler displays date headers in Day, Week, and WorkWeek views to identify the dates associated with the visible schedule. Header text can be customized using standard .NET date format strings to display either detailed or compact date information depending on the active view and available space.
The following properties control how dates are displayed in Scheduler headers:
- LongHeaderFormat - Specifies the header format used in Day view. The default value is “dddd, d MMMM yyyy”.
- FullWeekHeaderFormat - Specifies the header format used in Week view. The default value is “D” (long date pattern).
- WeekHeaderFormat - Specifies the header label format used in WorkWeek view. The default value is “MMM d”.
- WorkWeekHeaderFormat - Specifies the header format used in WorkWeek view. The default value is “MM/dd/yyyy”.
scheduleControl.Appearance.LongHeaderFormat = "dddd, MMMM dd yyyy";
scheduleControl.Appearance.FullWeekHeaderFormat = "D";
scheduleControl.Appearance.WeekHeaderFormat = "MMM dd";
scheduleControl.Appearance.WorkWeekHeaderFormat = "ddd dd";scheduleControl.Appearance.LongHeaderFormat = "dddd, MMMM dd yyyy"
scheduleControl.Appearance.FullWeekHeaderFormat = "D"
scheduleControl.Appearance.WeekHeaderFormat = "MMM dd"
scheduleControl.Appearance.WorkWeekHeaderFormat = "ddd dd"Customize Prime Time Appearance
The Scheduler supports highlighting a specific range of hours, known as prime time, to visually distinguish important scheduling periods from the rest of the day. Prime time is commonly used to emphasize business hours, working hours, or other key time ranges.
Configure Prime Time Range and Colors
The following properties define the prime time interval and customize the appearance of prime and non-prime time cells:
- PrimeTimeStart - Specifies the hour at which the prime time range begins.
- PrimeTimeEnd - Specifies the hour at which the prime time range ends.
- PrimeTimeCellColor - Specifies the background color applied to cells within the prime time range.
- NonPrimeTimeCellColor - Specifies the background color applied to cells outside the prime time range.
scheduleControl.Appearance.NonPrimeTimeCellColor = Color.LightGray;
scheduleControl.Appearance.PrimeTimeCellColor = Color.LightGreen;
scheduleControl.Appearance.PrimeTimeStart = 10;
scheduleControl.Appearance.PrimeTimeEnd = 18;scheduleControl.Appearance.NonPrimeTimeCellColor = Color.LightGray
scheduleControl.Appearance.PrimeTimeCellColor = Color.LightGreen
scheduleControl.Appearance.PrimeTimeStart = 10
scheduleControl.Appearance.PrimeTimeEnd = 18In this example, time slots between 10:00 AM and 6:00 PM are highlighted using a light green background, while all remaining time slots use a light gray background. This distinction helps draw attention to preferred scheduling hours and improves the readability of the schedule.
Customize the Time Column
The Scheduler displays a time column in Day and WorkWeek views to indicate the time associated with each time slot. The appearance and format of this column can be customized to improve readability and align with the application’s visual style.
Customize Time Column Display
The following properties control the visibility and format of the time column:
- ShowTime - Specifies whether the time column is displayed.
- Hours24 - Determines whether time values are displayed using a 24-hour format.
scheduleControl.Appearance.ShowTime = true;
scheduleControl.Appearance.Hours24 = true;scheduleControl.Appearance.ShowTime = True
scheduleControl.Appearance.Hours24 = TrueWhen Hours24 is set to true, time values are displayed using the 24-hour clock format. Setting ShowTime to false hides the time column from the Scheduler.
Customize Time Column Appearance
The appearance of the time column can be customized using the following properties:
- TimeBackColor - Specifies the background color of the time column.
- TimeTextColor - Specifies the color of the text displayed in the time column.
- MarkColumnColor - Specifies the color of the solid line displayed next to the time column in Day view.
scheduleControl.Appearance.TimeBackColor = Color.WhiteSmoke;
scheduleControl.Appearance.TimeTextColor = Color.DarkBlue;
scheduleControl.Appearance.MarkColumnColor = Color.SteelBlue;scheduleControl.Appearance.TimeBackColor = Color.WhiteSmoke
scheduleControl.Appearance.TimeTextColor = Color.DarkBlue
scheduleControl.Appearance.MarkColumnColor = Color.SteelBlueCustomize Time Column Font Size
The Scheduler uses different font sizes within the time column to display time labels.
- TimeBigFontSize - Specifies the size of the larger font used in the time column.
- TimeLittleFontSize - Specifies the size of the smaller font used in the time column.
scheduleControl.Appearance.TimeBigFontSize = 10;
scheduleControl.Appearance.TimeLittleFontSize = 8;scheduleControl.Appearance.TimeBigFontSize = 10
scheduleControl.Appearance.TimeLittleFontSize = 8