# scheduler-scheduler-demo

> Schedule populated from a sample data source showing day, week, workweek, month and agenda views with appointment navigation.

**Framework:** winforms  **Component:** Scheduler  **Variant:** scheduler-demo

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/winforms/scheduler-scheduler-demo.json
```

**Install Package(s)**

```bash
dotnet add package Syncfusion.Schedule.Windows
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/scheduler-scheduler-demo/scheduler.Designer.cs

```cs
﻿using System.Drawing;
using System.Windows.Forms;

namespace SchedulerDemo
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.scheduleControl1 = new Syncfusion.Windows.Forms.Schedule.ScheduleControl();
            this.buttonAdv6 = new Syncfusion.Windows.Forms.ButtonAdv();
            this.label1 = new System.Windows.Forms.Label();
            this.panel1 = new System.Windows.Forms.Panel();
            this.comboBoxAdv4 = new Syncfusion.Windows.Forms.Tools.ComboBoxAdv();
            this.comboBoxAdv3 = new Syncfusion.Windows.Forms.Tools.ComboBoxAdv();
            this.comboBoxAdv1 = new Syncfusion.Windows.Forms.Tools.ComboBoxAdv();
            this.comboBoxAdv2 = new Syncfusion.Windows.Forms.Tools.ComboBoxAdv();
            this.panel2 = new System.Windows.Forms.Panel();
            this.comboBoxAdv5 = new Syncfusion.Windows.Forms.Tools.ComboBoxAdv();
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.saveCalendarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.mergeCalendarAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.randomDataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.newItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.newAllDayItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.editItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.deleteItemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.contextMenuStrip3 = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.dayToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.workWeekToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.weekToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.monthToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.contextMenuStrip4 = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.appearanceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.changeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.loadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.saveToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
            this.cultureToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.invariantToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.applicationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.frIRToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.itITToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.enUSToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.deDEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.navigationPanelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.hiddenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.leftToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.rightToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.saveOnCloseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.doNotSaveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.promptBeforSavingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.saveWithoutPromptToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.weekNumbersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.alertsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.additionalPanelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.testsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.pictureBox2 = new System.Windows.Forms.PictureBox();
            this.panel1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.comboBoxAdv4)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.comboBoxAdv3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.comboBoxAdv1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.comboBoxAdv2)).BeginInit();
            this.panel2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.comboBoxAdv5)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            this.contextMenuStrip1.SuspendLayout();
            this.contextMenuStrip2.SuspendLayout();
            this.contextMenuStrip3.SuspendLayout();
            this.contextMenuStrip4.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
            this.SuspendLayout();
            //
            // scheduleControl1
            //
            this.scheduleControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.scheduleControl1.BackColor = System.Drawing.Color.Gray;
            this.scheduleControl1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.scheduleControl1.Culture = new System.Globalization.CultureInfo("");
            this.scheduleControl1.DataSource = null;
            this.scheduleControl1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.scheduleControl1.ForeColor = System.Drawing.SystemColors.ControlText;
            this.scheduleControl1.ISO8601CalenderFormat = false;
            this.scheduleControl1.Location = new System.Drawing.Point(6, 3);
            this.scheduleControl1.Name = "scheduleControl1";
            this.scheduleControl1.NavigationPanelPosition = Syncfusion.Schedule.CalendarNavigationPanelPosition.Left;
            this.scheduleControl1.ShowRoundedCorners = true;
            this.scheduleControl1.Size = new System.Drawing.Size(963, 445);
            this.scheduleControl1.TabIndex = 3;
            //
            // buttonAdv6
            //
            this.buttonAdv6.Appearance = Syncfusion.Windows.Forms.ButtonAppearance.Metro;
            this.buttonAdv6.BackColor = System.Drawing.Color.DeepSkyBlue;
            this.buttonAdv6.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.buttonAdv6.ForeColor = System.Drawing.Color.White;
            this.buttonAdv6.Location = new System.Drawing.Point(217, 30);
            this.buttonAdv6.Name = "buttonAdv6";
            this.buttonAdv6.Size = new System.Drawing.Size(84, 25);
            this.buttonAdv6.TabIndex = 10;
            this.buttonAdv6.Text = "Load";
            this.buttonAdv6.UseVisualStyle = true;
            this.buttonAdv6.Click += new System.EventHandler(this.buttonAdv6_Click);
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label1.ForeColor = System.Drawing.SystemColors.ControlDark;
            this.label1.Location = new System.Drawing.Point(2, 11);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(143, 20);
            this.label1.TabIndex = 11;
            this.label1.Text = "Choose Data Source";
            //
            // panel1
            //
            this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.panel1.Controls.Add(this.scheduleControl1);
            this.panel1.Location = new System.Drawing.Point(12, 126);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(973, 448);
            this.panel1.TabIndex = 13;
            //
            // comboBoxAdv4
            //
            this.comboBoxAdv4.BackColor = System.Drawing.Color.White;
            this.comboBoxAdv4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboBoxAdv4.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.comboBoxAdv4.Location = new System.Drawing.Point(10, 26);
            this.comboBoxAdv4.Name = "comboBoxAdv4";
            this.comboBoxAdv4.Size = new System.Drawing.Size(119, 21);
            this.comboBoxAdv4.Style = Syncfusion.Windows.Forms.VisualStyle.Metro;
            this.comboBoxAdv4.TabIndex = 19;
            //
            // comboBoxAdv3
            //
            this.comboBoxAdv3.BackColor = System.Drawing.Color.White;
            this.comboBoxAdv3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboBoxAdv3.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.comboBoxAdv3.Location = new System.Drawing.Point(6, 26);
            this.comboBoxAdv3.Name = "comboBoxAdv3";
            this.comboBoxAdv3.Size = new System.Drawing.Size(119, 21);
            this.comboBoxAdv3.Style = Syncfusion.Windows.Forms.VisualStyle.Metro;
            this.comboBoxAdv3.TabIndex = 19;
            //
            // comboBoxAdv1
            //
            this.comboBoxAdv1.BackColor = System.Drawing.Color.White;
            this.comboBoxAdv1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboBoxAdv1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.comboBoxAdv1.Location = new System.Drawing.Point(13, 28);
            this.comboBoxAdv1.Name = "comboBoxAdv1";
            this.comboBoxAdv1.Size = new System.Drawing.Size(119, 21);
            this.comboBoxAdv1.Style = Syncfusion.Windows.Forms.VisualStyle.Metro;
            this.comboBoxAdv1.TabIndex = 18;
            //
            // comboBoxAdv2
            //
            this.comboBoxAdv2.BackColor = System.Drawing.Color.White;
            this.comboBoxAdv2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.comboBoxAdv2.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.comboBoxAdv2.Location = new System.Drawing.Point(10, 28);
            this.comboBoxAdv2.Name = "comboBoxAdv2";
            this.comboBoxAdv2.Size = new System.Drawing.Size(119, 21);
            this.comboBoxAdv2.Style = Syncfusion.Windows.Forms.VisualStyle.Metro;
            this.comboBoxAdv2.TabIndex = 18;
            //
            // panel2
            //
            this.panel2.Controls.Add(this.pictureBox2);
            this.panel2.Controls.Add(this.comboBoxAdv5);
            this.panel2.Controls.Add(this.label1);
            this.panel2.Controls.Add(this.buttonAdv6);
            this.panel2.Location = new System.Drawing.Point(12, 58);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(972, 62);
            this.panel2.TabIndex = 26;
            //
            // comboBoxAdv5
            //
            this.comboBoxAdv5.AllowNewText = false;
            this.comboBoxAdv5.BackColor = System.Drawing.Color.White;
            this.comboBoxAdv5.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.comboBoxAdv5.ForeColor = System.Drawing.SystemColors.ControlDark;
            this.comboBoxAdv5.Location = new System.Drawing.Point(6, 34);
            this.comboBoxAdv5.Name = "comboBoxAdv5";
            this.comboBoxAdv5.Size = new System.Drawing.Size(188, 21);
            this.comboBoxAdv5.Style = Syncfusion.Windows.Forms.VisualStyle.Metro;
            this.comboBoxAdv5.TabIndex = 27;
            //
            // pictureBox1
            //
            this.pictureBox1.Location = new System.Drawing.Point(3, 0);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(451, 37);
            this.pictureBox1.TabIndex = 27;
            this.pictureBox1.TabStop = false;
            //
            // contextMenuStrip1
            //
            this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.newToolStripMenuItem,
            this.openToolStripMenuItem,
            this.saveCalendarToolStripMenuItem,
            this.saveToolStripMenuItem,
            this.mergeCalendarAsToolStripMenuItem,
            this.randomDataToolStripMenuItem,
            this.exitToolStripMenuItem});
            this.contextMenuStrip1.Name = "contextMenuStrip1";
            this.contextMenuStrip1.Size = new System.Drawing.Size(175, 158);
            //
            // newToolStripMenuItem
            //
            this.newToolStripMenuItem.Name = "newToolStripMenuItem";
            this.newToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
            this.newToolStripMenuItem.Text = "New Calendar";
            this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
            //
            // openToolStripMenuItem
            //
            this.openToolStripMenuItem.Name = "openToolStripMenuItem";
            this.openToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
            this.openToolStripMenuItem.Text = "Open Calendar";
            this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
            //
            // saveCalendarToolStripMenuItem
            //
            this.saveCalendarToolStripMenuItem.Name = "saveCalendarToolStripMenuItem";
            this.saveCalendarToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
            this.saveCalendarToolStripMenuItem.Text = "Save Calendar";
            this.saveCalendarToolStripMenuItem.Click += new System.EventHandler(this.saveCalendarToolStripMenuItem_Click);
            //
            // saveToolStripMenuItem
            //
            this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
            this.saveToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
            this.saveToolStripMenuItem.Text = "Save Calendar As";
            this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
            //
            // mergeCalendarAsToolStripMenuItem
            //
            this.mergeCalendarAsToolStripMenuItem.Name = "mergeCalendarAsToolStripMenuItem";
            this.mergeCalendarAsToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
            this.mergeCalendarAsToolStripMenuItem.Text = "Merge Calendar As";
            this.mergeCalendarAsToolStripMenuItem.Click += new System.EventHandler(this.mergeCalendarAsToolStripMenuItem_Click);
            //
            // randomDataToolStripMenuItem
            //
            this.randomDataToolStripMenuItem.Name = "randomDataToolStripMenuItem";
            this.randomDataToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
            this.randomDataToolStripMenuItem.Text = "Random Data";
            this.randomDataToolStripMenuItem.Click += new System.EventHandler(this.randomDataToolStripMenuItem_Click);
            //
            // exitToolStripMenuItem
            //
            this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
            this.exitToolStripMenuItem.Size = new System.Drawing.Size(174, 22);
            this.exitToolStripMenuItem.Text = "Exit";
            this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
            //
            // contextMenuStrip2
            //
            this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.newItemToolStripMenuItem,
            this.newAllDayItemToolStripMenuItem,
            this.editItemToolStripMenuItem,
            this.deleteItemToolStripMenuItem});
            this.contextMenuStrip2.Name = "contextMenuStrip2";
            this.contextMenuStrip2.Size = new System.Drawing.Size(180, 92);
            //
            // newItemToolStripMenuItem
            //
            this.newItemToolStripMenuItem.Name = "newItemToolStripMenuItem";
            this.newItemToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
            this.newItemToolStripMenuItem.Text = "New Item";
            this.newItemToolStripMenuItem.Click += new System.EventHandler(this.newItemToolStripMenuItem_Click);
            //
            // newAllDayItemToolStripMenuItem
            //
            this.newAllDayItemToolStripMenuItem.Name = "newAllDayItemToolStripMenuItem";
            this.newAllDayItemToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
            this.newAllDayItemToolStripMenuItem.Text = "New All Day Item";
            this.newAllDayItemToolStripMenuItem.Click += new System.EventHandler(this.newAllDayItemToolStripMenuItem_Click);
            //
            // editItemToolStripMenuItem
            //
            this.editItemToolStripMenuItem.Name = "editItemToolStripMenuItem";
            this.editItemToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
            this.editItemToolStripMenuItem.Text = "Edit Item";
            this.editItemToolStripMenuItem.Click += new System.EventHandler(this.editItemToolStripMenuItem_Click);
            //
            // deleteItemToolStripMenuItem
            //
            this.deleteItemToolStripMenuItem.Name = "deleteItemToolStripMenuItem";
            this.deleteItemToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
            this.deleteItemToolStripMenuItem.Text = "Delete Item";
            this.deleteItemToolStripMenuItem.Click += new System.EventHandler(this.deleteItemToolStripMenuItem_Click);
            //
            // contextMenuStrip3
            //
            this.contextMenuStrip3.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.dayToolStripMenuItem,
            this.workWeekToolStripMenuItem,
            this.weekToolStripMenuItem,
            this.monthToolStripMenuItem});
            this.contextMenuStrip3.Name = "contextMenuStrip3";
            this.contextMenuStrip3.Size = new System.Drawing.Size(180, 92);
            //
            // dayToolStripMenuItem
            //
            this.dayToolStripMenuItem.Name = "dayToolStripMenuItem";
            this.dayToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
            this.dayToolStripMenuItem.Text = "Day";
            this.dayToolStripMenuItem.Click += new System.EventHandler(this.dayToolStripMenuItem_Click);
            //
            // workWeekToolStripMenuItem
            //
            this.workWeekToolStripMenuItem.Name = "workWeekToolStripMenuItem";
            this.workWeekToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
            this.workWeekToolStripMenuItem.Text = "Work Week";
            this.workWeekToolStripMenuItem.Click += new System.EventHandler(this.workWeekToolStripMenuItem_Click);
            //
            // weekToolStripMenuItem
            //
            this.weekToolStripMenuItem.Name = "weekToolStripMenuItem";
            this.weekToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
            this.weekToolStripMenuItem.Text = "Week";
            this.weekToolStripMenuItem.Click += new System.EventHandler(this.weekToolStripMenuItem_Click);
            //
            // monthToolStripMenuItem
            //
            this.monthToolStripMenuItem.Name = "monthToolStripMenuItem";
            this.monthToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
            this.monthToolStripMenuItem.Text = "Month";
            this.monthToolStripMenuItem.Click += new System.EventHandler(this.monthToolStripMenuItem_Click);
            //
            // contextMenuStrip4
            //
            this.contextMenuStrip4.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.appearanceToolStripMenuItem,
            this.cultureToolStripMenuItem,
            this.navigationPanelToolStripMenuItem,
            this.saveOnCloseToolStripMenuItem,
            this.weekNumbersToolStripMenuItem,
            this.alertsToolStripMenuItem,
            this.additionalPanelToolStripMenuItem,
            this.testsToolStripMenuItem});
            this.contextMenuStrip4.Name = "contextMenuStrip4";
            this.contextMenuStrip4.Size = new System.Drawing.Size(180, 170);
            //
            // appearanceToolStripMenuItem
            //
            this.appearanceToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.changeToolStripMenuItem,
            this.loadToolStripMenuItem,
            this.saveToolStripMenuItem1});
            this.appearanceToolStripMenuItem.Name = "appearanceToolStripMenuItem";
            this.appearanceToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.appearanceToolStripMenuItem.Text = "Appearance";
            //
            // changeToolStripMenuItem
            //
            this.changeToolStripMenuItem.Name = "changeToolStripMenuItem";
            this.changeToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.changeToolStripMenuItem.Text = "Change";
            this.changeToolStripMenuItem.Click += new System.EventHandler(this.changeToolStripMenuItem_Click);
            //
            // loadToolStripMenuItem
            //
            this.loadToolStripMenuItem.Name = "loadToolStripMenuItem";
            this.loadToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.loadToolStripMenuItem.Text = "Load";
            this.loadToolStripMenuItem.Click += new System.EventHandler(this.loadToolStripMenuItem_Click);
            //
            // saveToolStripMenuItem1
            //
            this.saveToolStripMenuItem1.Name = "saveToolStripMenuItem1";
            this.saveToolStripMenuItem1.Size = new System.Drawing.Size(164, 22);
            this.saveToolStripMenuItem1.Text = "Save";
            this.saveToolStripMenuItem1.Click += new System.EventHandler(this.saveToolStripMenuItem1_Click);
            //
            // cultureToolStripMenuItem
            //
            this.cultureToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.invariantToolStripMenuItem,
            this.applicationToolStripMenuItem,
            this.frIRToolStripMenuItem,
            this.itITToolStripMenuItem,
            this.enUSToolStripMenuItem,
            this.deDEToolStripMenuItem});
            this.cultureToolStripMenuItem.Name = "cultureToolStripMenuItem";
            this.cultureToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.cultureToolStripMenuItem.Text = "Culture";
            //
            // invariantToolStripMenuItem
            //
            this.invariantToolStripMenuItem.Name = "invariantToolStripMenuItem";
            this.invariantToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.invariantToolStripMenuItem.Text = "Invariant";
            this.invariantToolStripMenuItem.Click += new System.EventHandler(this.invariantToolStripMenuItem_Click);
            //
            // applicationToolStripMenuItem
            //
            this.applicationToolStripMenuItem.Name = "applicationToolStripMenuItem";
            this.applicationToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.applicationToolStripMenuItem.Text = "Application";
            this.applicationToolStripMenuItem.Click += new System.EventHandler(this.applicationToolStripMenuItem_Click);
            //
            // frIRToolStripMenuItem
            //
            this.frIRToolStripMenuItem.Name = "frIRToolStripMenuItem";
            this.frIRToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.frIRToolStripMenuItem.Text = "fr-FR";
            this.frIRToolStripMenuItem.Click += new System.EventHandler(this.frIRToolStripMenuItem_Click);
            //
            // itITToolStripMenuItem
            //
            this.itITToolStripMenuItem.Name = "itITToolStripMenuItem";
            this.itITToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.itITToolStripMenuItem.Text = "it-IT";
            this.itITToolStripMenuItem.Click += new System.EventHandler(this.itITToolStripMenuItem_Click);
            //
            // enUSToolStripMenuItem
            //
            this.enUSToolStripMenuItem.Name = "enUSToolStripMenuItem";
            this.enUSToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.enUSToolStripMenuItem.Text = "en-US";
            this.enUSToolStripMenuItem.Click += new System.EventHandler(this.enUSToolStripMenuItem_Click);
            //
            // deDEToolStripMenuItem
            //
            this.deDEToolStripMenuItem.Name = "deDEToolStripMenuItem";
            this.deDEToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.deDEToolStripMenuItem.Text = "de-DE";
            this.deDEToolStripMenuItem.Click += new System.EventHandler(this.deDEToolStripMenuItem_Click);
            //
            // navigationPanelToolStripMenuItem
            //
            this.navigationPanelToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.hiddenToolStripMenuItem,
            this.leftToolStripMenuItem,
            this.rightToolStripMenuItem});
            this.navigationPanelToolStripMenuItem.Name = "navigationPanelToolStripMenuItem";
            this.navigationPanelToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.navigationPanelToolStripMenuItem.Text = "Navigation Panel";
            //
            // hiddenToolStripMenuItem
            //
            this.hiddenToolStripMenuItem.Name = "hiddenToolStripMenuItem";
            this.hiddenToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.hiddenToolStripMenuItem.Text = "Hidden";
            this.hiddenToolStripMenuItem.Click += new System.EventHandler(this.hiddenToolStripMenuItem_Click);
            //
            // leftToolStripMenuItem
            //
            this.leftToolStripMenuItem.Name = "leftToolStripMenuItem";
            this.leftToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.leftToolStripMenuItem.Text = "Left";
            this.leftToolStripMenuItem.Click += new System.EventHandler(this.leftToolStripMenuItem_Click);
            //
            // rightToolStripMenuItem
            //
            this.rightToolStripMenuItem.Name = "rightToolStripMenuItem";
            this.rightToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.rightToolStripMenuItem.Text = "Right";
            this.rightToolStripMenuItem.Click += new System.EventHandler(this.rightToolStripMenuItem_Click);
            //
            // saveOnCloseToolStripMenuItem
            //
            this.saveOnCloseToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.doNotSaveToolStripMenuItem,
            this.promptBeforSavingToolStripMenuItem,
            this.saveWithoutPromptToolStripMenuItem});
            this.saveOnCloseToolStripMenuItem.Name = "saveOnCloseToolStripMenuItem";
            this.saveOnCloseToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.saveOnCloseToolStripMenuItem.Text = "Save On Close";
            //
            // doNotSaveToolStripMenuItem
            //
            this.doNotSaveToolStripMenuItem.Name = "doNotSaveToolStripMenuItem";
            this.doNotSaveToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.doNotSaveToolStripMenuItem.Text = "Do Not Save";
            this.doNotSaveToolStripMenuItem.Click += new System.EventHandler(this.doNotSaveToolStripMenuItem_Click);
            //
            // promptBeforSavingToolStripMenuItem
            //
            this.promptBeforSavingToolStripMenuItem.Name = "promptBeforSavingToolStripMenuItem";
            this.promptBeforSavingToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.promptBeforSavingToolStripMenuItem.Text = "Prompt Before Saving";
            this.promptBeforSavingToolStripMenuItem.Click += new System.EventHandler(this.promptBeforSavingToolStripMenuItem_Click);
            //
            // saveWithoutPromptToolStripMenuItem
            //
            this.saveWithoutPromptToolStripMenuItem.Name = "saveWithoutPromptToolStripMenuItem";
            this.saveWithoutPromptToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.saveWithoutPromptToolStripMenuItem.Text = "Save Without Prompt";
            this.saveWithoutPromptToolStripMenuItem.Click += new System.EventHandler(this.saveWithoutPromptToolStripMenuItem_Click);
            //
            // weekNumbersToolStripMenuItem
            //
            this.weekNumbersToolStripMenuItem.Name = "weekNumbersToolStripMenuItem";
            this.weekNumbersToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.weekNumbersToolStripMenuItem.Text = "Week Numbers";
            this.weekNumbersToolStripMenuItem.Click += new System.EventHandler(this.weekNumbersToolStripMenuItem_Click);
            //
            // alertsToolStripMenuItem
            //
            this.alertsToolStripMenuItem.Name = "alertsToolStripMenuItem";
            this.alertsToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.alertsToolStripMenuItem.Text = "Alerts";
            this.alertsToolStripMenuItem.Click += new System.EventHandler(this.alertsToolStripMenuItem_Click);
            //
            // additionalPanelToolStripMenuItem
            //
            this.additionalPanelToolStripMenuItem.Name = "additionalPanelToolStripMenuItem";
            this.additionalPanelToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.additionalPanelToolStripMenuItem.Text = "Additional Panel";
            this.additionalPanelToolStripMenuItem.Click += new System.EventHandler(this.additionalPanelToolStripMenuItem_Click);
            //
            // testsToolStripMenuItem
            //
            this.testsToolStripMenuItem.Name = "testsToolStripMenuItem";
            this.testsToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
            this.testsToolStripMenuItem.Text = "Test";
            this.testsToolStripMenuItem.Click += new System.EventHandler(this.testsToolStripMenuItem_Click);
            //
            // pictureBox2
            //
            this.pictureBox2.Location = new System.Drawing.Point(339, 3);
            this.pictureBox2.Name = "pictureBox2";
            this.pictureBox2.Size = new System.Drawing.Size(123, 56);
            this.pictureBox2.TabIndex = 28;
            this.pictureBox2.TabStop = false;
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.BackColor = System.Drawing.SystemColors.ButtonHighlight;
            this.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226)))));
            this.BorderThickness = 2;
            this.CaptionFont = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.CaptionForeColor = Color.White;
            this.MetroColor = Color.Transparent;
            this.ClientSize = new System.Drawing.Size(996, 586);
            this.Controls.Add(this.pictureBox1);
            this.Controls.Add(this.panel2);
            this.Controls.Add(this.panel1);
            this.MinimumSize = new System.Drawing.Size(900, 590);
            this.Name = "Form1";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Scheduler";
            this.panel1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.comboBoxAdv4)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.comboBoxAdv3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.comboBoxAdv1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.comboBoxAdv2)).EndInit();
            this.panel2.ResumeLayout(false);
            this.panel2.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.comboBoxAdv5)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            this.contextMenuStrip1.ResumeLayout(false);
            this.contextMenuStrip2.ResumeLayout(false);
            this.contextMenuStrip3.ResumeLayout(false);
            this.contextMenuStrip4.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
            this.ResumeLayout(false);
        }

        #endregion
    }
}

```

### src/components/scheduler-scheduler-demo/scheduler.cs

```cs
﻿using Syncfusion.GridHelperClasses;
using Syncfusion.Schedule;
using Syncfusion.Telemetry;
using Syncfusion.Windows.Forms;
using Syncfusion.Windows.Forms.Schedule;
using System;
using System.Collections;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Windows.Forms;

namespace SchedulerDemo
{
    /// <summary>
    /// Demonstrates the ScheduleControl: the appointments are shown in the day,
    /// work week, week and month views and the sample offers a menu to change
    /// the data source, the appearance, the culture and the navigation panel.
    /// </summary>
    public partial class Form1 : MetroForm
    {
        #region API Definition

        private Syncfusion.Windows.Forms.Schedule.ScheduleControl scheduleControl1;
        private Syncfusion.Windows.Forms.ButtonAdv buttonAdv6;
        private Label label1;
        private Panel panel1;
        private Syncfusion.Windows.Forms.Tools.ComboBoxAdv comboBoxAdv2;
        private Syncfusion.Windows.Forms.Tools.ComboBoxAdv comboBoxAdv4;
        private Syncfusion.Windows.Forms.Tools.ComboBoxAdv comboBoxAdv3;
        private Syncfusion.Windows.Forms.Tools.ComboBoxAdv comboBoxAdv1;
        private Panel panel2;
        private Syncfusion.Windows.Forms.Tools.ComboBoxAdv comboBoxAdv5;
        private PictureBox pictureBox1;
        private ContextMenuStrip contextMenuStrip1;
        private ToolStripMenuItem newToolStripMenuItem;
        private ToolStripMenuItem openToolStripMenuItem;
        private ToolStripMenuItem saveCalendarToolStripMenuItem;
        private ToolStripMenuItem saveToolStripMenuItem;
        private ToolStripMenuItem mergeCalendarAsToolStripMenuItem;
        private ToolStripMenuItem randomDataToolStripMenuItem;
        private ToolStripMenuItem exitToolStripMenuItem;
        private ContextMenuStrip contextMenuStrip2;
        private ToolStripMenuItem newItemToolStripMenuItem;
        private ToolStripMenuItem newAllDayItemToolStripMenuItem;
        private ToolStripMenuItem editItemToolStripMenuItem;
        private ToolStripMenuItem deleteItemToolStripMenuItem;
        private ContextMenuStrip contextMenuStrip3;
        private ToolStripMenuItem dayToolStripMenuItem;
        private ToolStripMenuItem workWeekToolStripMenuItem;
        private ToolStripMenuItem weekToolStripMenuItem;
        private ToolStripMenuItem monthToolStripMenuItem;
        private ContextMenuStrip contextMenuStrip4;
        private ToolStripMenuItem appearanceToolStripMenuItem;
        private ToolStripMenuItem changeToolStripMenuItem;
        private ToolStripMenuItem loadToolStripMenuItem;
        private ToolStripMenuItem saveToolStripMenuItem1;
        private ToolStripMenuItem cultureToolStripMenuItem;
        private ToolStripMenuItem invariantToolStripMenuItem;
        private ToolStripMenuItem applicationToolStripMenuItem;
        private ToolStripMenuItem frIRToolStripMenuItem;
        private ToolStripMenuItem itITToolStripMenuItem;
        private ToolStripMenuItem enUSToolStripMenuItem;
        private ToolStripMenuItem deDEToolStripMenuItem;
        private ToolStripMenuItem navigationPanelToolStripMenuItem;
        private ToolStripMenuItem hiddenToolStripMenuItem;
        private ToolStripMenuItem leftToolStripMenuItem;
        private ToolStripMenuItem rightToolStripMenuItem;
        private ToolStripMenuItem saveOnCloseToolStripMenuItem;
        private ToolStripMenuItem doNotSaveToolStripMenuItem;
        private ToolStripMenuItem promptBeforSavingToolStripMenuItem;
        private ToolStripMenuItem saveWithoutPromptToolStripMenuItem;
        private ToolStripMenuItem weekNumbersToolStripMenuItem;
        private ToolStripMenuItem alertsToolStripMenuItem;
        private ToolStripMenuItem additionalPanelToolStripMenuItem;
        private ToolStripMenuItem testsToolStripMenuItem;
        private PictureBox pictureBox2;

        /// <summary>
        /// The panel that is added to the navigation panel when it is requested.
        /// </summary>
        private Panel p = null;

        #endregion

        #region Constructor

        /// <summary>
        /// Initializes a new instance of the <see cref="Form1"/> class.
        /// </summary>
        public Form1()
        {
            InitializeComponent();

            string menuImage = SchedulerDemoDataSource.GetMenuImagePath();
            if (menuImage != null)
            {
                pictureBox1.Image = new Bitmap(menuImage);
            }

            pictureBox1.MouseDown += new MouseEventHandler(pictureBox1_MouseDown);
            pictureBox1.MouseMove += new MouseEventHandler(pictureBox1_MouseMove);

            string climateImage = SchedulerDemoDataSource.GetClimateImagePath();
            if (climateImage != null)
            {
                pictureBox2.Image = new Bitmap(climateImage);
            }

            SimpleScheduleDataProvider scheduleProvider;

            string fileName = SchedulerDemoDataSource.DefaultScheduleFileName;
            if (FindFile(ref fileName))
            {
                scheduleProvider = SimpleScheduleDataProvider.LoadBinary(fileName);
                scheduleProvider.FileName = fileName;
            }
            else
            {
                scheduleProvider = new SimpleScheduleDataProvider();
                scheduleProvider.MasterList = new SimpleScheduleAppointmentList();
                scheduleProvider.FileName = SchedulerDemoDataSource.DefaultScheduleFileName;
            }

            this.scheduleControl1.ScheduleType = ScheduleViewType.Month;
            scheduleControl1.DataSource = scheduleProvider;
            scheduleControl1.Appearance.VisualStyle = Syncfusion.Windows.Forms.GridVisualStyles.Metro;

            SimpleScheduleDataProvider dataProvider = new SimpleScheduleDataProvider();
            dataProvider.MasterList = SimpleScheduleDataProvider.InitializeRandomData();
            scheduleControl1.DataSource = dataProvider;

            foreach (ScheduleAppointment sc in dataProvider.MasterList)
            {
                sc.ReminderText = dataProvider.GetReminders()[sc.ReminderValue].DisplayMember;
            }

            StringCollection dataSourceNames = new StringCollection();
            foreach (string name in SchedulerDemoDataSource.DataSourceNames)
            {
                dataSourceNames.Add(name);
            }

            comboBoxAdv5.DataSource = dataSourceNames;

            this.scheduleControl1.ScheduleAppointmentClick += new ScheduleAppointmentClickEventHandler(scheduleControl1_ScheduleAppointmentClick);
            this.scheduleControl1.Appearance.EnableAdvancedToolTip = true;

            try
            {
                string iconFile = SchedulerDemoDataSource.GetAssetPath(Path.Combine("Icon", "Suite.ico"));
                if (iconFile != null)
                {
                    this.Icon = new System.Drawing.Icon(iconFile);
                }
            }
            catch
            {
                // The icon is optional, the form still works without it.
            }

            ToolTip();

            this.pictureBox1.MouseHover += new EventHandler(pictureBox1_MouseHover);
            this.pictureBox1.MouseLeave += new EventHandler(pictureBox1_MouseLeave);

            this.scheduleControl1.NavigationPanelFillWithCalendar = true;
            this.scheduleControl1.NavigationPanel.Width = (int)Syncfusion.Windows.Forms.DpiAware.LogicalToDeviceUnits(180);
            this.scheduleControl1.Calendar.CalenderGrid.DpiAware = true;
            this.scheduleControl1.Calendar.CalenderGrid.DefaultRowHeight = (int)Syncfusion.Windows.Forms.DpiAware.LogicalToDeviceUnits(15);
        }

        #endregion

        #region ToolTip

        /// <summary>
        /// Shows the advanced tool tip that carries the weather information.
        /// </summary>
        private void ToolTip()
        {
            ToolTipControl control = new ToolTipControl();

            string userToolImage = SchedulerDemoDataSource.GetUserToolImagePath();
            if (userToolImage != null)
            {
                control.SetToolTipImage(userToolImage);
            }

            AdvancedToolTip userToolTip = new AdvancedToolTip(control, pictureBox2);
            userToolTip.AnimationDuration = 0;
            userToolTip.ShowingAnimation = ToolTipAnimations.RightToLeft | ToolTipAnimations.Blend;
            userToolTip.ArrowHeadDirection = ArrowHeadDirection.Top;
            userToolTip.DropShadowEnabled = false;
        }

        #endregion

        #region Events

        /// <summary>
        /// Catches the clicks on the schedule control.
        /// </summary>
        private void scheduleControl1_ScheduleAppointmentClick(object sender, ScheduleAppointmentClickEventArgs e)
        {
            Console.WriteLine("scheduleControl1_ScheduleAppointmentClick: {0} {1}", e.ClickType, e.ClickDateTime);
        }

        /// <summary>
        /// Creates a new, empty calendar.
        /// </summary>
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CheckAndSaveIfNeeded(true);

            SimpleScheduleDataProvider scheduleProvider = new SimpleScheduleDataProvider();
            scheduleProvider.MasterList = new SimpleScheduleAppointmentList();
            scheduleProvider.FileName = "newScheduleFile.schedule";
            scheduleProvider.IsDirty = true;
            this.scheduleControl1.DataSource = scheduleProvider;
        }

        private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
        {
        }

        private void pictureBox1_MouseLeave(object sender, EventArgs e)
        {
            this.Cursor = Cursors.Arrow;
        }

        private void pictureBox1_MouseHover(object sender, EventArgs e)
        {
            this.Cursor = Cursors.Hand;
        }

        /// <summary>
        /// Shows the menu that belongs to the menu item that was clicked.
        /// </summary>
        private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Location.X >= 218 && e.Location.X <= 236 && e.Location.Y >= 22 && e.Location.Y <= 32)
            {
                Point pt = pictureBox1.PointToScreen(e.Location);
                pt.X -= 50;
                pt.Y += 7;
                this.contextMenuStrip1.Show(pt);
            }

            if (e.Location.X >= 262 && e.Location.X <= 286 && e.Location.Y >= 22 && e.Location.Y <= 32)
            {
                Point pt = pictureBox1.PointToScreen(e.Location);
                pt.X -= 50;
                pt.Y += 7;
                this.contextMenuStrip2.Show(pt);
                this.SetDisplayRectLocation(247, 17);
            }

            if (e.Location.X >= 308 && e.Location.X <= 337 && e.Location.Y >= 22 && e.Location.Y <= 32)
            {
                Point pt = pictureBox1.PointToScreen(e.Location);
                pt.X -= 50;
                pt.Y += 7;
                this.contextMenuStrip3.Show(pt);
            }

            if (e.Location.X >= 358 && e.Location.X <= 408 && e.Location.Y >= 22 && e.Location.Y <= 32)
            {
                Point pt = pictureBox1.PointToScreen(e.Location);
                pt.X -= 50;
                pt.Y += 7;
                this.contextMenuStrip4.Show(pt);
            }
        }

        /// <summary>
        /// Opens a schedule file that was saved earlier.
        /// </summary>
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CheckAndSaveIfNeeded(true);

            OpenFileDialog dlg = new OpenFileDialog();
            dlg.Title = "Open Schedule file";
            dlg.InitialDirectory = Environment.CurrentDirectory;
            dlg.Filter = "Schedule files (*.schedule)|*.schedule|All files (*.*)|*.*";

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    this.scheduleControl1.DataSource = SimpleScheduleDataProvider.LoadBinary(dlg.FileName);
                    ((SimpleScheduleDataProvider)this.scheduleControl1.DataSource).FileName = dlg.FileName;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }

        /// <summary>
        /// Saves the calendar to the file it is bound to.
        /// </summary>
        private void saveCalendarToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (((SimpleScheduleDataProvider)this.scheduleControl1.DataSource).FileName == "newScheduleFile.schedule")
            {
                this.saveToolStripMenuItem.PerformClick();
            }
            else
            {
                CheckAndSaveIfNeeded(false);
            }
        }

        /// <summary>
        /// Saves the calendar to a new file.
        /// </summary>
        private void saveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFile = new SaveFileDialog();
            saveFile.DefaultExt = "*.schedule";
            saveFile.FileName = ((SimpleScheduleDataProvider)this.scheduleControl1.DataSource).FileName;
            saveFile.Filter = "Schedule Files|*.schedule";

            if (saveFile.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    ((SimpleScheduleDataProvider)this.scheduleControl1.DataSource).SaveBinary(saveFile.FileName);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }

        /// <summary>
        /// Merges the appointments of another schedule into the current one.
        /// </summary>
        private void mergeCalendarAsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();
            dlg.Title = "Merge Schedule file";
            dlg.InitialDirectory = Environment.CurrentDirectory;
            dlg.Filter = "Schedule files (*.schedule)|*.schedule|All files (*.*)|*.*";

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    SimpleScheduleDataProvider mergeProvider = SimpleScheduleDataProvider.LoadBinary(dlg.FileName);
                    SimpleScheduleDataProvider dataProvider = this.scheduleControl1.DataSource as SimpleScheduleDataProvider;
                    this.scheduleControl1.Calendar.BeginUpdate();

                    foreach (SimpleScheduleAppointment item in mergeProvider.MasterList)
                    {
                        dataProvider.AddItem(item);
                    }

                    dataProvider.MasterList.SortStartTime();
                    this.scheduleControl1.Calendar.EndUpdate();
                    this.scheduleControl1.ResetProvider(this.scheduleControl1.ScheduleType);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }

        /// <summary>
        /// Fills the calendar with the generated sample data.
        /// </summary>
        private void randomDataToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CheckAndSaveIfNeeded(true);

            SimpleScheduleDataProvider dataProvider = new SimpleScheduleDataProvider();
            dataProvider.MasterList = SimpleScheduleDataProvider.InitializeRandomData();
            dataProvider.FileName = "random.schedule";

            this.scheduleControl1.DataSource = dataProvider;
        }

        /// <summary>
        /// Closes the application.
        /// </summary>
        private void exitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        /// <summary>
        /// Loads the data source that is selected in the combo box.
        /// </summary>
        private void buttonAdv6_Click(object sender, EventArgs e)
        {
            if (comboBoxAdv5.SelectedIndex == 0)
            {
                SimpleScheduleDataProvider dataProvider = new SimpleScheduleDataProvider();
                dataProvider.MasterList = SimpleScheduleDataProvider.InitializeRandomData();
                dataProvider.FileName = SchedulerDemoDataSource.DefaultScheduleFileName;

                this.scheduleControl1.ScheduleType = ScheduleViewType.Month;
                scheduleControl1.DataSource = dataProvider;
                scheduleControl1.Appearance.VisualStyle = Syncfusion.Windows.Forms.GridVisualStyles.Metro;
            }
            else if (comboBoxAdv5.SelectedIndex == 1)
            {
                string databasePath = SchedulerDemoDataSource.GetDatabasePath();

                if (databasePath != null)
                {
                    MDB_ScheduleDataProvider scheduleProvider = new MDB_ScheduleDataProvider(databasePath);

                    SimpleScheduleDataProvider dataProvider = new SimpleScheduleDataProvider();
                    dataProvider.MasterList = SimpleScheduleDataProvider.InitializeRandomDataSource();
                    dataProvider.FileName = SchedulerDemoDataSource.DatabaseFileName;

                    this.scheduleControl1.ScheduleType = ScheduleViewType.Month;
                    scheduleControl1.DataSource = dataProvider;
                    scheduleControl1.Appearance.VisualStyle = Syncfusion.Windows.Forms.GridVisualStyles.Metro;
                }
            }
        }

        /// <summary>
        /// Adds a new appointment to the schedule.
        /// </summary>
        private void newItemToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.PerformNewItemClick();
        }

        /// <summary>
        /// Adds a new all day appointment to the schedule.
        /// </summary>
        private void newAllDayItemToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.PerformNewAllDayItemClick();
        }

        /// <summary>
        /// Edits the appointment that was clicked.
        /// </summary>
        private void editItemToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.PerformEditItemClick();
        }

        /// <summary>
        /// Deletes the appointment that was clicked.
        /// </summary>
        private void deleteItemToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.PerformDeleteItemClick();
        }

        /// <summary>
        /// Switches to the day view and turns the alerts on.
        /// </summary>
        private void testsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.SwitchToScheduleViewTypeDay(DateTime.Now);
            this.scheduleControl1.EnableAlerts = true;
        }

        /// <summary>
        /// Switches the schedule to the day view.
        /// </summary>
        private void dayToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SetCheckValues(sender as ToolStripMenuItem);

            if (this.scheduleControl1.ScheduleType != ScheduleViewType.Day)
            {
                this.scheduleControl1.PerformSwitchToScheduleViewTypeClick(ScheduleViewType.Day);
            }
        }

        /// <summary>
        /// Checks the supplied item and unchecks the other items of the menu.
        /// </summary>
        private void SetCheckValues(ToolStripMenuItem item)
        {
            item.Checked = true;

            ContextMenuStrip contextMenuStrip = item.Owner as ContextMenuStrip;
            foreach (ToolStripMenuItem menuItem in contextMenuStrip.Items)
            {
                if (item != menuItem)
                {
                    menuItem.Checked = false;
                }
            }
        }

        /// <summary>
        /// Switches the schedule to the work week view.
        /// </summary>
        private void workWeekToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SetCheckValues(sender as ToolStripMenuItem);

            if (this.scheduleControl1.ScheduleType != ScheduleViewType.WorkWeek)
            {
                this.scheduleControl1.PerformSwitchToScheduleViewTypeClick(ScheduleViewType.WorkWeek);
            }
        }

        /// <summary>
        /// Switches the schedule to the week view.
        /// </summary>
        private void weekToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SetCheckValues(sender as ToolStripMenuItem);

            if (this.scheduleControl1.ScheduleType != ScheduleViewType.Week)
            {
                this.scheduleControl1.PerformSwitchToScheduleViewTypeClick(ScheduleViewType.Week);
            }
        }

        /// <summary>
        /// Switches the schedule to the month view.
        /// </summary>
        private void monthToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SetCheckValues(sender as ToolStripMenuItem);

            if (this.scheduleControl1.ScheduleType != ScheduleViewType.Month)
            {
                this.scheduleControl1.PerformSwitchToScheduleViewTypeClick(ScheduleViewType.Month);
            }
        }

        /// <summary>
        /// Opens the property grid that edits the appearance of the schedule.
        /// </summary>
        private void changeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (propertyForm == null)
            {
                propertyForm = new PropertyGridForm();
                propertyForm.Closing += new CancelEventHandler(propertyForm_Closing);
                propertyForm.AppearancePropertyGrid1.SelectedObject = this.scheduleControl1.Appearance;
                propertyForm.AppearancePropertyGrid1.PropertyValueChanged += new PropertyValueChangedEventHandler(AppearancePropertyGrid1_PropertyValueChanged);
            }

            if (!propertyForm.Visible)
            {
                propertyForm.Show();
            }
        }

        /// <summary>
        /// Saves the current appearance to a file.
        /// </summary>
        private void loadToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFile = new SaveFileDialog();
            saveFile.DefaultExt = "*.appearance";
            saveFile.FileName = "";
            saveFile.Filter = "Appearance Files|*.appearance";

            if (saveFile.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    this.scheduleControl1.Appearance.SaveBinary(saveFile.FileName);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }

        /// <summary>
        /// Loads an appearance from a file.
        /// </summary>
        private void saveToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();
            dlg.Title = "Open Appearance file";
            dlg.InitialDirectory = Environment.CurrentDirectory;
            dlg.Filter = "Appearance files (*.appearance)|*.appearance";

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    ScheduleAppearance appearance = ScheduleAppearance.LoadBinary(dlg.FileName);
                    appearance.AttachSchedule(this.scheduleControl1);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }

        /// <summary>
        /// Uses the invariant culture for the schedule.
        /// </summary>
        private void invariantToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.Culture = CultureInfo.InvariantCulture;
        }

        /// <summary>
        /// Uses the culture of the application for the schedule.
        /// </summary>
        private void applicationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.Culture = Application.CurrentCulture;
        }

        /// <summary>
        /// Uses the French culture for the schedule.
        /// </summary>
        private void frIRToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.Culture = CultureInfo.CreateSpecificCulture("fr-FR");
        }

        /// <summary>
        /// Uses the Italian culture for the schedule.
        /// </summary>
        private void itITToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.Culture = CultureInfo.CreateSpecificCulture("it-IT");
        }

        /// <summary>
        /// Uses the American English culture for the schedule.
        /// </summary>
        private void enUSToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.Culture = CultureInfo.CreateSpecificCulture("en-US");
        }

        /// <summary>
        /// Uses the German culture for the schedule.
        /// </summary>
        private void deDEToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.Culture = CultureInfo.CreateSpecificCulture("de-DE");
        }

        /// <summary>
        /// Turns the alerts of the schedule on or off.
        /// </summary>
        private void alertsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.EnableAlerts = !this.scheduleControl1.EnableAlerts;
            this.alertsToolStripMenuItem.Checked = this.scheduleControl1.EnableAlerts;
        }

        /// <summary>
        /// Saves the schedule without asking the user.
        /// </summary>
        private void doNotSaveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.DataSource.SaveOnCloseBehaviorAction = SaveOnCloseBehavior.DoNotSave;
        }

        /// <summary>
        /// Asks the user before the schedule is saved.
        /// </summary>
        private void promptBeforSavingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.DataSource.SaveOnCloseBehaviorAction = SaveOnCloseBehavior.PromptBeforeSave;
        }

        /// <summary>
        /// Saves the schedule without asking the user.
        /// </summary>
        private void saveWithoutPromptToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.DataSource.SaveOnCloseBehaviorAction = SaveOnCloseBehavior.SaveWithoutPrompt;
        }

        /// <summary>
        /// Hides the navigation panel.
        /// </summary>
        private void hiddenToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.SetNavigationPanelPosition(CalendarNavigationPanelPosition.Hidden);
        }

        /// <summary>
        /// Moves the navigation panel to the left.
        /// </summary>
        private void leftToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.SetNavigationPanelPosition(CalendarNavigationPanelPosition.Left);
        }

        /// <summary>
        /// Moves the navigation panel to the right.
        /// </summary>
        private void rightToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.SetNavigationPanelPosition(CalendarNavigationPanelPosition.Right);
        }

        /// <summary>
        /// Shows or hides the week numbers of the schedule.
        /// </summary>
        private void weekNumbersToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.scheduleControl1.Calendar.ShowWeekNumbers = !this.scheduleControl1.Calendar.ShowWeekNumbers;
        }

        /// <summary>
        /// Adds or removes the additional panel of the navigation panel.
        /// </summary>
        private void additionalPanelToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.additionalPanelToolStripMenuItem.Checked = !this.additionalPanelToolStripMenuItem.Checked;

            if (this.additionalPanelToolStripMenuItem.Checked)
            {
                p = new Panel();
                p.BackColor = Color.Blue;
                p.Dock = DockStyle.Fill;
                this.scheduleControl1.NavigationPanel.Controls.Add(p);
            }
            else
            {
                this.scheduleControl1.NavigationPanel.Controls.Remove(p);

                if (p != null)
                {
                    p.Dispose();
                    p = null;
                }
            }
        }

        #endregion

        #region Utility methods

        /// <summary>
        /// Commits the changes of the schedule when the user asks for it.
        /// </summary>
        private void CheckAndSaveIfNeeded(bool prompt)
        {
            SimpleScheduleDataProvider provider = this.scheduleControl1.DataSource as SimpleScheduleDataProvider;
            if (provider == null)
            {
                return;
            }

            if (provider.FileName == null)
            {
                provider.FileName = SchedulerDemoDataSource.DefaultScheduleFileName;
            }

            if (this.scheduleControl1.DataSource.IsDirty &&
                (!prompt || MessageBox.Show("Save changes?", this.Name, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes))
            {
                this.scheduleControl1.DataSource.CommitChanges();
            }
        }

        #endregion

        #region Appearance

        PropertyGridForm propertyForm = null;

        /// <summary>
        /// Hides the property grid instead of closing it.
        /// </summary>
        private void propertyForm_Closing(object sender, CancelEventArgs e)
        {
            propertyForm.Hide();
            e.Cancel = true;
        }

        /// <summary>
        /// Applies the edited appearance property to the schedule.
        /// </summary>
        private void AppearancePropertyGrid1_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            e.ChangedItem.PropertyDescriptor.SetValue(this.scheduleControl1.Appearance, e.ChangedItem.Value);
            this.scheduleControl1.Refresh();
        }

        #endregion

        #region Helper

        /// <summary>
        /// Looks for the supplied file in the folders above the working directory.
        /// </summary>
        private bool FindFile(ref string fileName)
        {
            int attempt = 0;
            while (attempt < 4 && !File.Exists(fileName))
            {
                fileName = "..\\" + fileName;
                attempt++;
            }

            return File.Exists(fileName);
        }

        /// <summary>
        /// Closes the property grid when the form is closed.
        /// </summary>
        protected override void OnClosing(CancelEventArgs e)
        {
            SimpleScheduleDataProvider provider = this.scheduleControl1.DataSource as SimpleScheduleDataProvider;
            if (provider != null && provider.FileName == null)
            {
                provider.FileName = SchedulerDemoDataSource.DefaultScheduleFileName;
            }

            if (this.propertyForm != null)
            {
                this.propertyForm.Hide();
                propertyForm.AppearancePropertyGrid1.PropertyValueChanged -= new PropertyValueChangedEventHandler(AppearancePropertyGrid1_PropertyValueChanged);
                propertyForm.Closing -= new CancelEventHandler(propertyForm_Closing);
                propertyForm.Close();
            }

            base.OnClosing(e);
        }

        #endregion
    }
}

```
