{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "scheduler-major-minor-tick",
  "framework": "maui",
  "type": "registry:component",
  "component": "Scheduler",
  "variant": "major-minor-tick",
  "dependencies": [
    "Syncfusion.Maui.Scheduler",
    "Syncfusion.Maui.Sliders"
  ],
  "description": "Scheduler sets major and minor ticks with a slider that changes the time slot count.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/maui/llms.txt",
    "skillPack": "syncfusion/maui-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/maui/scheduler-major-minor-tick.md"
  },
  "files": [
    {
      "target": "src/components/scheduler-major-minor-tick/Scheduler.xaml",
      "content": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<ContentPage xmlns=\"http://schemas.microsoft.com/dotnet/2021/maui\"\n             xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"\n             xmlns:model=\"clr-namespace:MAUI.Controls.Scheduler.MajorMinorTick\"\n             xmlns:slider=\"clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders\"\n             xmlns:schedule=\"clr-namespace:Syncfusion.Maui.Scheduler;assembly=Syncfusion.Maui.Scheduler\"\n             x:Class=\"MAUI.Controls.Scheduler.MajorMinorTick.MajorMinorTickPage\"\n             x:DataType=\"model:MajorMinorTickViewModel\"\n             Title=\"Scheduler - Major and Minor Tick\">\n    <Grid RowDefinitions=\"0.8*,0.2*\" Padding=\"8\">\n        <schedule:SfScheduler x:Name=\"Scheduler\" View=\"Week\" ShowBusyIndicator=\"True\"\n                              IsAppointmentToolTipEnabled=\"True\"\n                              AllowAppointmentDrag=\"True\" AppointmentsSource=\"{Binding Events}\"\n                              MinimumDateTime=\"{Binding MinDateTime}\" MaximumDateTime=\"{Binding MaxDateTime}\"\n                              DisplayDate=\"{Binding DisplayDate}\"\n                              AllowOverlap=\"False\"\n                              AppointmentEditorMode=\"Add,Edit\"\n                              AllowedViews=\"Day,Week,WorkWeek,TimelineDay,TimelineWeek,TimelineWorkWeek\"\n                              AllowViewNavigation=\"True\" ShowDatePickerButton=\"True\">\n        <schedule:SfScheduler.CellContextMenu>\n                    <schedule:MenuItemCollection>\n                        <schedule:MenuItem Text=\"Add\"\n                                           Command=\"{x:Static schedule:SchedulerCommands.Add}\"\n                                           CommandParameter=\"{Binding}\">\n                            <schedule:MenuItem.Icon>\n                                <FontImageSource Glyph=\"&#xE70D;\"\n                                                 FontFamily=\"MauiMaterialAssets\"/>\n                            </schedule:MenuItem.Icon>\n                        </schedule:MenuItem>\n                    </schedule:MenuItemCollection>\n                </schedule:SfScheduler.CellContextMenu>\n                <schedule:SfScheduler.AppointmentContextMenu>\n                    <schedule:MenuItemCollection>\n                        <schedule:MenuItem Text=\"Edit\"\n                                           Command=\"{x:Static schedule:SchedulerCommands.Edit}\"\n                                           CommandParameter=\"{Binding}\">\n                            <schedule:MenuItem.Icon>\n                                <FontImageSource Glyph=\"&#xE710;\"\n                                                 FontFamily=\"MauiMaterialAssets\"/>\n                            </schedule:MenuItem.Icon>\n                        </schedule:MenuItem>\n                        <schedule:MenuItem Text=\"Delete\"\n                                           Command=\"{x:Static schedule:SchedulerCommands.Delete}\"\n                                           CommandParameter=\"{Binding}\">\n                            <schedule:MenuItem.Icon>\n                                <FontImageSource Glyph=\"&#xE70F;\"\n                                                 FontFamily=\"MauiMaterialAssets\"/>\n                            </schedule:MenuItem.Icon>\n                        </schedule:MenuItem>\n                    </schedule:MenuItemCollection>\n                </schedule:SfScheduler.AppointmentContextMenu>\n        </schedule:SfScheduler>\n        <VerticalStackLayout Grid.Row=\"1\" Padding=\"0,8\">\n            <Label Text=\"Time slot count\"\n                   FontSize=\"16\"\n                   VerticalOptions=\"Center\"\n                   HorizontalOptions=\"Start\" />\n            <slider:SfSlider x:Name=\"timeSlotCountSlider\"\n                             Value=\"2\"\n                             Interval=\"2\"\n                             ShowTicks=\"True\"\n                             ShowLabels=\"True\"\n                             MinorTicksPerInterval=\"1\"\n                             StepSize=\"1\"\n                             Minimum=\"0\"\n                             Maximum=\"6\"\n                             HorizontalOptions=\"Start\"\n                             VerticalOptions=\"Center\"\n                             ValueChanged=\"OnTimeSlotCountValueChanged\" />\n        </VerticalStackLayout>\n    </Grid>\n</ContentPage>\n"
    },
    {
      "target": "src/components/scheduler-major-minor-tick/Scheduler.xaml.cs",
      "content": "using Syncfusion.Maui.Scheduler;\nusing Syncfusion.Maui.Sliders;\n\nnamespace MAUI.Controls.Scheduler.MajorMinorTick\n{\n    public partial class MajorMinorTickPage : ContentPage\n    {\n        /// <summary>\n        /// The pixels-per-slot constant used to size each major tick.\n        /// Slot height (DaysView) and slot width (TimelineView) = 28 * TimeSlotCount.\n        /// </summary>\n        private const double PixelsPerSlot = 28d;\n\n        public MajorMinorTickPage()\n        {\n            InitializeComponent();\n            BindingContext = new MajorMinorTickViewModel();\n\n            Scheduler.DaysView.TimeSlotCount = 2;\n            Scheduler.TimelineView.TimeSlotCount = 2;\n            Scheduler.ViewChanged += OnSchedulerViewChanged;\n        }\n\n        /// <summary>\n        /// Applies the chosen time slot count to both the days and timeline views.\n        /// </summary>\n        private void ApplyTimeSlotCount(int timeSlotCount)\n        {\n            if (timeSlotCount < 2)\n            {\n                Scheduler.DaysView.TimeSlotCount = timeSlotCount;\n                Scheduler.DaysView.TimeIntervalHeight = 50;\n\n                Scheduler.TimelineView.TimeSlotCount = timeSlotCount;\n                Scheduler.TimelineView.TimeIntervalWidth = double.NaN;\n                return;\n            }\n\n            var majorSize = PixelsPerSlot * timeSlotCount;\n\n            Scheduler.DaysView.TimeSlotCount = timeSlotCount;\n            Scheduler.DaysView.TimeIntervalHeight = majorSize;\n\n            Scheduler.TimelineView.TimeSlotCount = timeSlotCount;\n            Scheduler.TimelineView.TimeIntervalWidth = majorSize;\n        }\n\n        private void OnTimeSlotCountValueChanged(object? sender, SliderValueChangedEventArgs e)\n        {\n            ApplyTimeSlotCount((int)e.NewValue);\n        }\n\n        private void OnSchedulerViewChanged(object? sender, SchedulerViewChangedEventArgs args)\n        {\n            if (args.OldView == args.NewView)\n            {\n                return;\n            }\n\n            ApplyTimeSlotCount((int)timeSlotCountSlider.Value);\n        }\n\n        protected override void OnDisappearing()\n        {\n            base.OnDisappearing();\n            Scheduler.ViewChanged -= OnSchedulerViewChanged;\n        }\n    }\n}\n"
    }
  ]
}