From 3cd039348182a6081a4bb69853fc905262d5c1b5 Mon Sep 17 00:00:00 2001 From: SriRadheshNag Date: Thu, 9 Oct 2025 15:27:53 +0530 Subject: [PATCH 1/7] Updated --- MAUI/Scheduler/drag-and-drop-appointments.md | 11 +- MAUI/Scheduler/month-view.md | 24 ++++ MAUI/Scheduler/resource-view.md | 58 ++++++++- MAUI/Segmented-Control/customization.md | 92 +++++++++++++- MAUI/Segmented-Control/events.md | 59 +++++++++ .../images/customization/selected-segment.png | Bin 0 -> 6531 bytes MAUI/Segmented-Control/selection.md | 118 ++++++++++++------ maui-toc.html | 1 + 8 files changed, 320 insertions(+), 43 deletions(-) create mode 100644 MAUI/Segmented-Control/events.md create mode 100644 MAUI/Segmented-Control/images/customization/selected-segment.png diff --git a/MAUI/Scheduler/drag-and-drop-appointments.md b/MAUI/Scheduler/drag-and-drop-appointments.md index ed23a40b7d..dcc088c906 100644 --- a/MAUI/Scheduler/drag-and-drop-appointments.md +++ b/MAUI/Scheduler/drag-and-drop-appointments.md @@ -98,6 +98,7 @@ Using the [AppointmentDrop](https://help.syncfusion.com/cr/maui/Syncfusion.Maui. [DropTime](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.AppointmentDropEventArgs.html#Syncfusion_Maui_Scheduler_AppointmentDropEventArgs_DropTime) - Get or set the date and time at which the appointment is being dropped. [SourceResource](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.AppointmentDropEventArgs.html#Syncfusion_Maui_Scheduler_AppointmentDropEventArgs_SourceResource) - Get the original resource of the appointment that is being dropped. [TargetResource](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.AppointmentDropEventArgs.html#Syncfusion_Maui_Scheduler_AppointmentDropEventArgs_TargetResource) - Get the resource into which the appointment is being dropped. +`IsDroppingToAllDay` - Gets a value indicating whether an appointment is being dropped into an all-day slot. {% tabs %} {% highlight c# %} @@ -107,9 +108,13 @@ scheduler.AppointmentDrop += OnSchedulerAppointmentDrop; private void OnSchedulerAppointmentDrop(object? sender, AppointmentDropEventArgs e) { - var appointment = e.Appointment; - e.Cancel = false; - var dropTime = e.DropTime; + var appointment = e.Appointment; + e.Cancel = false; + var dropTime = e.DropTime; + if (e.IsDroppingToAllDay) + { + e.Cancel = true; + } } {% endhighlight %} {% endtabs %} diff --git a/MAUI/Scheduler/month-view.md b/MAUI/Scheduler/month-view.md index ef7e5a1126..4f2b95c3a4 100644 --- a/MAUI/Scheduler/month-view.md +++ b/MAUI/Scheduler/month-view.md @@ -83,6 +83,30 @@ this.Scheduler.MonthView.AppointmentIndicatorCount = 1; ![change-appointment-indicator-count-in-maui-scheduler](images/month-view/change-appointment-indicator-count-in-maui-scheduler.jpeg) +## Appointment indicator size + +The scheduler month view allows you to customize the size of the appointment indicator by using the `AppointmentIndicatorSize` property of the [MonthView](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerMonthView.html). By default, the `AppointmentIndicatorSize` is set to 6d. + +{% tabs %} +{% highlight XAML hl_lines="5" %} + + + + + + + +{% endhighlight %} +{% highlight C# hl_lines="3" %} + +this.Scheduler.View = SchedulerView.Month; +this.Scheduler.MonthView.AppointmentDisplayMode = SchedulerMonthAppointmentDisplayMode.Indicator; +this.Scheduler.MonthView.AppointmentIndicatorSize = 20; + +{% endhighlight %} +{% endtabs %} + ## Hide leading and trailing dates The previous and next month dates from a Scheduler month view can be hidden by using the [ShowLeadingAndTrailingDates](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerMonthView.html#Syncfusion_Maui_Scheduler_SchedulerMonthView_ShowLeadingAndTrailingDates) property in the [MonthView](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerMonthView.html). The `ShowLeadingAndTrailingDates` property defaults to `true.` diff --git a/MAUI/Scheduler/resource-view.md b/MAUI/Scheduler/resource-view.md index 2cf0d7ed99..a8fc53e4e5 100644 --- a/MAUI/Scheduler/resource-view.md +++ b/MAUI/Scheduler/resource-view.md @@ -172,9 +172,11 @@ this.Scheduler.ResourceView.ResourceGroupType = SchedulerResourceGroupType.Date; ![Resource Grouping By Date in Days View in .NET MAUI Scheduler.](images/resource-view/group-resources-by-date-in-days-view-in-net-maui-scheduler.png) -## Visible Resource Count in Days View +## Visible Resource Count -The number of resources shown in the day, week, and work week views can be controlled using the [`VisibleResourceCount`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html#Syncfusion_Maui_Scheduler_SchedulerResourceView_VisibleResourceCount) property of the [`SchedulerResourceView`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html#Syncfusion_Maui_Scheduler_SchedulerResourceView_Resources) class. This lets you define how many resources are visible at a time. +The number of resources shown in the day, week, work week, timelineday, timelineweek, timelineworkweek views can be controlled using the [`VisibleResourceCount`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html#Syncfusion_Maui_Scheduler_SchedulerResourceView_VisibleResourceCount) property of the [`SchedulerResourceView`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html#Syncfusion_Maui_Scheduler_SchedulerResourceView_Resources) class. This lets you define how many resources are visible at a time. + +### Days View {% tabs %} {% highlight xaml tabtitle="MainPage.xaml" hl_lines="3" %} @@ -202,9 +204,36 @@ this.Scheduler.ResourceView.VisibleResourceCount = 4; ![Visible Resource Count in Days View in .NET MAUI Scheduler.](images/resource-view/visible-resource-count-for-resources-in-days-view-in-.net-maui-scheduler.png) +### Timeline View + +{% tabs %} +{% highlight xaml tabtitle="MainPage.xaml" hl_lines="3" %} + + + + + +{% endhighlight %} +{% highlight c# tabtitle="MainPage.xaml.cs" hl_lines="12" %} +var Resources = new ObservableCollection() +{ + new SchedulerResource() { Name = "Sophia", Foreground = Colors.White, Background = Colors.LightGreen, Id = "1000" }, + new SchedulerResource() { Name = "Zoey Addison", Foreground = Colors.White, Background = Colors.Gold, Id = "1001" }, + new SchedulerResource() { Name = "James William", Foreground = Colors.White, Background = Colors.Violet, Id = "1002" }, + new SchedulerResource() { Name = "Brooklyn", Foreground = Colors.White, Background = Colors.LightSkyBlue, Id = "1003" }, + new SchedulerResource() { Name = "Stephen", Foreground = Colors.White, Background = Colors.PeachPuff, Id = "1004" }, + new SchedulerResource() { Name = "Elena", Foreground = Colors.White, Background = Colors.Pink, Id = "1005" }, +}; + +this.Scheduler.ResourceView.Resources = Resources; +this.Scheduler.ResourceView.VisibleResourceCount = 4; +{% endhighlight %} +{% endtabs %} + N> * When [`VisibleResourceCount`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html#Syncfusion_Maui_Scheduler_SchedulerResourceView_VisibleResourceCount) is set to -1, the `SfScheduler` displays up to three resources. If the total number of resources is less than three, it displays all available resources. * When [`VisibleResourceCount`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html#Syncfusion_Maui_Scheduler_SchedulerResourceView_VisibleResourceCount) is set to 0, the resource view layout is removed, and only the plain Scheduler view (e.g., Day view without resources) is shown. +* This property applies to the horizontal resource view on Windows and macOS, and to the timeline resource view on all platforms. When the value is -1 (default), the horizontal resource view displays three resources. In timeline resource views, the number of visible resource rows is determined by the minimum row height, and the auto row height. ## Resource Header Height in Days View @@ -233,6 +262,31 @@ this.Scheduler.ResourceView.ResourceHeaderHeight = 100; ![Resource Header Height in Days View in .NET MAUI Scheduler.](images/resource-view/resource-header-height-for-resources-in-days-view-in-.net-maui-scheduler.png) +## Resource Header Width in Timeline View + +In the timelineday, timelineweek, and timeline work week views, resources are arranged vertically. The width of the resource headers can be customized using the `ResourceHeaderWidth` property of the [`SchedulerResourceView`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html#Syncfusion_Maui_Scheduler_SchedulerResourceView_Resources) class. + +{% tabs %} +{% highlight xaml tabtitle="MainPage.xaml" hl_lines="3" %} + + + + + +{% endhighlight %} +{% highlight C# tabtitle="MainPage.xaml.cs" hl_lines="9" %} +var Resources = new ObservableCollection() +{ + new SchedulerResource() { Name = "Sophia", Foreground = Colors.White, Background = Colors.LightGreen, Id = "1000" }, + new SchedulerResource() { Name = "Zoey Addison", Foreground = Colors.White, Background = Colors.Gold, Id = "1001" }, + new SchedulerResource() { Name = "James William", Foreground = Colors.White, Background = Colors.Violet, Id = "1002" }, +}; + +this.Scheduler.ResourceView.Resources = Resources; +this.Scheduler.ResourceView.ResourceHeaderWidth = 200; +{% endhighlight %} +{% endtabs %} + ## Resource minimum row height You can customize resource minimum row height of visible resources in timeline day, timeline week, timeline workweek and timeline month views by using the [MinimumRowHeight](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html#Syncfusion_Maui_Scheduler_SchedulerResourceView_MinimumRowHeight) property of [SchedulerResourceView](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html) in [SfScheduler.](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SfScheduler.html) By default, resource row height will be auto-expanded from minimum height based on the appointment counts. diff --git a/MAUI/Segmented-Control/customization.md b/MAUI/Segmented-Control/customization.md index de07ff19bd..1fc0c3a7d2 100644 --- a/MAUI/Segmented-Control/customization.md +++ b/MAUI/Segmented-Control/customization.md @@ -435,4 +435,94 @@ Use the [SegmentTemplate](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Bu {% endhighlight %} {% endtabs %} -![Appearance customization using DataTemplate in .NET MAUI Segmented control.](images/customization/segment-template.png) \ No newline at end of file +![Appearance customization using DataTemplate in .NET MAUI Segmented control.](images/customization/segment-template.png) + +## Customize selected segment item appearance using DataTemplate + +Use the `IsSelected` property of `SfSegmentItem` to customize the selected segment item appearance. The following example code shows how to create a custom segmented control using a data template. + +{% tabs %} +{% highlight XAML %} + + + + + + + + + + + + Day + Week + Month + Year + + + + + + + + + + + + +{% endhighlight %} +{% highlight C# tabtitle="MainPage.xaml.cs" %} + +using Syncfusion.Maui.Buttons; +. . . + +public partial class MainPage : ContentPage +{ + public MainPage() + { + InitializeComponent(); + SfSegmentedControl segmentedControl = new SfSegmentedControl(); + List segmentItems = new List + { + new SfSegmentItem() {Text="Day", Background = Colors.LightBlue}, + new SfSegmentItem() {Text="Week", Background = Colors.LightBlue}, + new SfSegmentItem() {Text="Month", Background = Colors.LightBlue}, + new SfSegmentItem() {Text="Year", Background = Colors.LightBlue}, + }; + segmentedControl.ItemsSource = segmentItems; + this.Content = segmentedControl; + } +} + +{% endhighlight %} +{% highlight C# tabtitle="TextColorConverter.cs" %} + +public class TextColorConverter : IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is bool isSelected) + { + return isSelected ? Colors.Green : Colors.Red; + } + + return Colors.Black; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + } +} + +{% endhighlight %} +{% endtabs %} + +N> +* The BindingContext of the `SegmentTemplate` is the `SfSegmentItem`. + +![Customization for the selected segment item in .NET MAUI Segmented control.](images/customization/selected-segment.png) \ No newline at end of file diff --git a/MAUI/Segmented-Control/events.md b/MAUI/Segmented-Control/events.md new file mode 100644 index 0000000000..8f28d6c34c --- /dev/null +++ b/MAUI/Segmented-Control/events.md @@ -0,0 +1,59 @@ +--- +layout: post +title: Events in .NET MAUI Segmented control | Syncfusion +description: Learn here all about the Events support in Syncfusion® .NET MAUI Segmented Control (SfSegmentedControl). +platform: maui +control: SfSegmentedControl +documentation: ug +--- + +# Events in .NET MAUI Segmented Control (SfSegmentedControl) + +The Segmented Control supports the `Tapped,` and `SelectionChanged` events to interact with .NET MAUI Segmented Control + +## Tapped + +A Tapped event occurs, each time a segment tapped. + +Below is a list of the arguments: + +* `Sender`: This contains the `SfSegmentedControl` object. + +* `Tapped`: The tapped action performed on an Segment can be found in the `SegmentTappedEventArgs`, you can see details about the `SegmentItem`. + +## SelectionChanged + +The [SelectionChanged](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfSegmentedControl.html#Syncfusion_Maui_Buttons_SfSegmentedControl_SelectionChanged) event is triggered once the segment is selected in the segmented control. The [SelectionChangedEventArgs](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SelectionChangedEventArgs.html) has the following values, which provide information for the `SelectionChanged` event. + +* OldIndex +* NewIndex +* OldValue +* NewValue + +{% tabs %} +{% highlight C# %} + +using Syncfusion.Maui.Buttons; +. . . + +public partial class MainPage : ContentPage +{ + public MainPage() + { + InitializeComponent(); + SfSegmentedControl segmentedControl = new SfSegmentedControl(); + segmentedControl.SelectionChanged += OnSegmentedControlSelectionChanged; + this.Content = segmentedControl; + } + + private void OnSegmentedControlSelectionChanged(object sender, Syncfusion.Maui.Buttons.SelectionChangedEventArgs e) + { + var newValue = e.NewValue; + var oldValue = e.OldValue; + var newIndex = e.NewIndex; + var oldIndex = e.OldIndex; + } +} + +{% endhighlight %} +{% endtabs %} \ No newline at end of file diff --git a/MAUI/Segmented-Control/images/customization/selected-segment.png b/MAUI/Segmented-Control/images/customization/selected-segment.png new file mode 100644 index 0000000000000000000000000000000000000000..03592df6182df59a0090316b564474f65076a2d2 GIT binary patch literal 6531 zcmeHM`8$+**nc{TN|bCN6encOUWCGMWJ`=?gtCu)879Wi;wXe9gi!Wf!`OxyEe2V# zOc-MsM#;X<(2U`o&bi*@y59fbz1|<5<$K-t{d}MA{eAA`^LgTLTNrbl6g~+60GG*M zhIatqk5$(F*W>K0bAr(IQP$;1=pAEypyuoOMb_Y`*G==A0Dwy2+`oT}H9isamqRE3 zaDV=N9O()ya|ZySb0&s2Z5}wUPMvt~6o%y3(7SkX8FAF6E*0c@++FgajH!fekMn&A z`!kM$RT&hOC7aGHh}Kn$T>a8y5reRfh6Kq(*Ky8Qaezcm#+fUB>OYi!b~3`@i~jn0 zTjB%fve9PwJmrkcrwSkZ6@_d)1(J9M0>GO92 z@HH3EUiUu7aV>uN)oyAzk|CYH=LBi+0bAi*4w-jMO?&4LFG73|Lk)$14|y9)7&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LpR|)bN>gm6B*-P?2AzS+qcq`zvz+sf+SEJw`jH^eUDrWC6w}IB2QTy1H8py!sFhgRO?|- z{$8tu>L#5vsSIRtE@Xh^(fV`ug1Z#pIbEW_Lb?PSNFc!s=Bgl)8}mp}S=+#y%w=(n zsYGyb39^X%HBejR7#(3ur?Ryx1Q0lZK>}z#euY;^rtY?Tfwk}Wvs_8^x)dShO@`vH z(t#4U>1bGRQ>{pC>t!9<#w0p;t}}!ac$g=tV&R_KeLWTV?{pnsc}eiXk54#?9e(De z>mt5L6TX+H5hlClOY>b2){%Sfj0s!CN*RtvfEBC+!LTv@Ij@8Cf6-2Fkj|Bt#p`o) z7=0Ajz*Ie9JugbjpM<_l6(7_~I#>^`)eNl$kicKjbfllMA~ORr4+?=>r~ zXL{jrIhljlZ%){W%Gw&s-V8-crRz<9Dn#6OfHZ|WDU0;Q#?KM7$<$=E@X6O9rWk$i zfe&$9B80T<{9D^Ub+YmzLvBK_K4DhVwE`p#?(_DJ>_tb|7=kGb+OlJt(E!@#N5$_j zT70qTMwq$yr1#E(*npDrOV_@!k8Vckmj-ogN0(~IdQ7v(ZO6{yi%T_P{z!$lwGQ=C z)lT&_jn0nOlk2W{559#Fiwt~wf3uQLOK?b!jI}?}Uf#2hLD0ovk8*!}584&v=#O>X zo(o$ZP5|8bJu_cBxO ZWompjgv04N>&FRT0 + + + + + + + +{% endhighlight %} +{% highlight C# %} + +using Syncfusion.Maui.Buttons; +. . . + +public partial class MainPage : ContentPage +{ + public MainPage() + { + InitializeComponent(); + SfSegmentedControl segmentedControl = new SfSegmentedControl(); + segmentedControl.SelectionMode = SegmentSelectionMode.Single; + this.Content = segmentedControl; + } +} + +{% endhighlight %} +{% endtabs %} + +### Single Deselection + +The Single Deselection can be performed in the `Segmented Control` by setting the `SelectionMode` property to `SingleDeselect`. In this mode, only one item can be selected at a time, and you can deselect the currently selected item by simply clicking on it again. This provides a quick way to clear the selection without needing additional actions. + +{% tabs %} +{% highlight XAML %} + + + + + + + + + +{% endhighlight %} +{% highlight C# %} + +using Syncfusion.Maui.Buttons; +. . . + +public partial class MainPage : ContentPage +{ + public MainPage() + { + InitializeComponent(); + SfSegmentedControl segmentedControl = new SfSegmentedControl(); + segmentedControl.SelectionMode = SegmentSelectionMode.SingleDeselect; + this.Content = segmentedControl; + } +} + +{% endhighlight %} +{% endtabs %} + ## Customize selected segment The selected segment of the Segmented control is customized using the [SelectionIndicatorSettings](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfSegmentedControl.html#Syncfusion_Maui_Buttons_SfSegmentedControl_SelectionIndicatorSettings) property of [SfSegmentedControl](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfSegmentedControl.html). @@ -512,40 +592,4 @@ public partial class MainPage : ContentPage {% endhighlight %} {% endtabs %} -![Enable or Disable Ripple Effect Animation in .NET MAUI Segmented control.](images/selection/enable-ripple-effect.gif) - -## Notifying segment selection changes -The [SelectionChanged](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SfSegmentedControl.html#Syncfusion_Maui_Buttons_SfSegmentedControl_SelectionChanged) event is triggered once the segment is selected in the segmented control. The [SelectionChangedEventArgs](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Buttons.SelectionChangedEventArgs.html) has the following values, which provide information for the `SelectionChanged` event. - -* OldIndex -* NewIndex -* OldValue -* NewValue - -{% tabs %} -{% highlight C# %} - -using Syncfusion.Maui.Buttons; -. . . - -public partial class MainPage : ContentPage -{ - public MainPage() - { - InitializeComponent(); - SfSegmentedControl segmentedControl = new SfSegmentedControl(); - segmentedControl.SelectionChanged += OnSegmentedControlSelectionChanged; - this.Content = segmentedControl; - } - - private void OnSegmentedControlSelectionChanged(object sender, Syncfusion.Maui.Buttons.SelectionChangedEventArgs e) - { - var newValue = e.NewValue; - var oldValue = e.OldValue; - var newIndex = e.NewIndex; - var oldIndex = e.OldIndex; - } -} - -{% endhighlight %} -{% endtabs %} \ No newline at end of file +![Enable or Disable Ripple Effect Animation in .NET MAUI Segmented control.](images/selection/enable-ripple-effect.gif) \ No newline at end of file diff --git a/maui-toc.html b/maui-toc.html index af95fd56a2..4ea406e428 100644 --- a/maui-toc.html +++ b/maui-toc.html @@ -1200,6 +1200,7 @@
  • Disabled segment items
  • Layout
  • Customization
  • +
  • Events
  • Right To Left
  • Accessibility
  • From 9129051718847f2f7d9bbefc63df428651bff0ad Mon Sep 17 00:00:00 2001 From: SriRadheshNag Date: Mon, 13 Oct 2025 14:31:14 +0530 Subject: [PATCH 2/7] Updated the pr corrections --- MAUI/Scheduler/drag-and-drop-appointments.md | 18 ++++++++++++ MAUI/Scheduler/month-view.md | 4 +-- MAUI/Scheduler/resource-view.md | 29 +++++++++++--------- 3 files changed, 36 insertions(+), 15 deletions(-) diff --git a/MAUI/Scheduler/drag-and-drop-appointments.md b/MAUI/Scheduler/drag-and-drop-appointments.md index dcc088c906..2ee46d4eb0 100644 --- a/MAUI/Scheduler/drag-and-drop-appointments.md +++ b/MAUI/Scheduler/drag-and-drop-appointments.md @@ -111,11 +111,29 @@ private void OnSchedulerAppointmentDrop(object? sender, AppointmentDropEventArgs var appointment = e.Appointment; e.Cancel = false; var dropTime = e.DropTime; +} + +{% endhighlight %} +{% endtabs %} + +### How to prevent dropping appointments into the All-day panel + +You can use the `IsDroppingToAllDay` property to prevent appointments from being dropped into the all-day panel by setting `e.Cancel` as `true`. + +{% tabs %} +{% highlight c# %} +scheduler.AppointmentDrop += OnSchedulerAppointmentDrop; +... + +private void OnSchedulerAppointmentDrop(object? sender, AppointmentDropEventArgs e) +{ + var appointment = e.Appointment; if (e.IsDroppingToAllDay) { e.Cancel = true; } } + {% endhighlight %} {% endtabs %} diff --git a/MAUI/Scheduler/month-view.md b/MAUI/Scheduler/month-view.md index 4f2b95c3a4..a606e5d2c6 100644 --- a/MAUI/Scheduler/month-view.md +++ b/MAUI/Scheduler/month-view.md @@ -93,7 +93,7 @@ The scheduler month view allows you to customize the size of the appointment ind - + @@ -102,7 +102,7 @@ The scheduler month view allows you to customize the size of the appointment ind this.Scheduler.View = SchedulerView.Month; this.Scheduler.MonthView.AppointmentDisplayMode = SchedulerMonthAppointmentDisplayMode.Indicator; -this.Scheduler.MonthView.AppointmentIndicatorSize = 20; +this.Scheduler.MonthView.AppointmentIndicatorSize = 10; {% endhighlight %} {% endtabs %} diff --git a/MAUI/Scheduler/resource-view.md b/MAUI/Scheduler/resource-view.md index a8fc53e4e5..e907e46704 100644 --- a/MAUI/Scheduler/resource-view.md +++ b/MAUI/Scheduler/resource-view.md @@ -182,23 +182,27 @@ The number of resources shown in the day, week, work week, timelineday, timeline {% highlight xaml tabtitle="MainPage.xaml" hl_lines="3" %} - + {% endhighlight %} {% highlight c# tabtitle="MainPage.xaml.cs" hl_lines="12" %} var Resources = new ObservableCollection() { - new SchedulerResource() { Name = "Sophia", Foreground = Colors.White, Background = Colors.LightGreen, Id = "1000" }, - new SchedulerResource() { Name = "Zoey Addison", Foreground = Colors.White, Background = Colors.Gold, Id = "1001" }, - new SchedulerResource() { Name = "James William", Foreground = Colors.White, Background = Colors.Violet, Id = "1002" }, - new SchedulerResource() { Name = "Brooklyn", Foreground = Colors.White, Background = Colors.LightSkyBlue, Id = "1003" }, - new SchedulerResource() { Name = "Stephen", Foreground = Colors.White, Background = Colors.PeachPuff, Id = "1004" }, - new SchedulerResource() { Name = "Elena", Foreground = Colors.White, Background = Colors.Pink, Id = "1005" }, + new SchedulerResource { Name = "Sophia", Foreground = Colors.White, Background = Colors.LightGreen, Id = "1000" }, + new SchedulerResource { Name = "Zoey Addison", Foreground = Colors.White, Background = Colors.Gold, Id = "1001" }, + new SchedulerResource { Name = "Aiden Clark", Foreground = Colors.White, Background = Colors.LightSkyBlue,Id = "1002" }, + new SchedulerResource { Name = "Mia Johnson", Foreground = Colors.White, Background = Colors.Tomato, Id = "1003" }, + new SchedulerResource { Name = "Liam Parker", Foreground = Colors.White, Background = Colors.Orchid, Id = "1004" }, + new SchedulerResource { Name = "Olivia Bennett", Foreground = Colors.White, Background = Colors.SlateBlue, Id = "1005" }, + new SchedulerResource { Name = "Noah Ramirez", Foreground = Colors.White, Background = Colors.SeaGreen, Id = "1006" }, + new SchedulerResource { Name = "Ava Thompson", Foreground = Colors.White, Background = Colors.Coral, Id = "1007" }, + new SchedulerResource { Name = "Ethan Davis", Foreground = Colors.White, Background = Colors.DodgerBlue, Id = "1008" }, + new SchedulerResource { Name = "Isabella Moore", Foreground = Colors.White, Background = Colors.MediumOrchid,Id = "1009" }, }; this.Scheduler.ResourceView.Resources = Resources; -this.Scheduler.ResourceView.VisibleResourceCount = 4; +this.Scheduler.ResourceView.VisibleResourceCount = 6; {% endhighlight %} {% endtabs %} @@ -231,9 +235,8 @@ this.Scheduler.ResourceView.VisibleResourceCount = 4; {% endtabs %} N> -* When [`VisibleResourceCount`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html#Syncfusion_Maui_Scheduler_SchedulerResourceView_VisibleResourceCount) is set to -1, the `SfScheduler` displays up to three resources. If the total number of resources is less than three, it displays all available resources. -* When [`VisibleResourceCount`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html#Syncfusion_Maui_Scheduler_SchedulerResourceView_VisibleResourceCount) is set to 0, the resource view layout is removed, and only the plain Scheduler view (e.g., Day view without resources) is shown. -* This property applies to the horizontal resource view on Windows and macOS, and to the timeline resource view on all platforms. When the value is -1 (default), the horizontal resource view displays three resources. In timeline resource views, the number of visible resource rows is determined by the minimum row height, and the auto row height. +* When [`VisibleResourceCount`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html#Syncfusion_Maui_Scheduler_SchedulerResourceView_VisibleResourceCount) is set to 0, the resource view layout is removed, and only the plain Scheduler view is shown. +* [`VisibleResourceCount`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html#Syncfusion_Maui_Scheduler_SchedulerResourceView_VisibleResourceCount) applies to the horizontal resource view on Windows and macOS, and to the timeline resource view on all platforms. When the value is -1 (default), the horizontal resource view displays three resources. In timeline resource views, the number of visible resource rows is determined by the minimum row height, and the auto row height. ## Resource Header Height in Days View @@ -270,7 +273,7 @@ In the timelineday, timelineweek, and timeline work week views, resources are ar {% highlight xaml tabtitle="MainPage.xaml" hl_lines="3" %} - + {% endhighlight %} @@ -283,7 +286,7 @@ var Resources = new ObservableCollection() }; this.Scheduler.ResourceView.Resources = Resources; -this.Scheduler.ResourceView.ResourceHeaderWidth = 200; +this.Scheduler.ResourceView.ResourceHeaderWidth = 250; {% endhighlight %} {% endtabs %} From 4ea173197a39132168298f17c71295c4da4f7983 Mon Sep 17 00:00:00 2001 From: SriRadheshNag Date: Mon, 13 Oct 2025 22:05:58 +0530 Subject: [PATCH 3/7] Updated ci fix --- MAUI/Scheduler/drag-and-drop-appointments.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAUI/Scheduler/drag-and-drop-appointments.md b/MAUI/Scheduler/drag-and-drop-appointments.md index 2ee46d4eb0..cf1491d47c 100644 --- a/MAUI/Scheduler/drag-and-drop-appointments.md +++ b/MAUI/Scheduler/drag-and-drop-appointments.md @@ -1,7 +1,7 @@ --- layout: post -Title: Appointment Drag and Drop in .NET MAUI Scheduler Control | Syncfusion® -Description: Learn here all about Appointment drag and drop support in the Syncfusion® .NET MAUI Scheduler(SfScheduler) control. +title: Appointment Drag and Drop in .NET MAUI Scheduler Control | Syncfusion® +description: Learn here all about Appointment drag and drop support in the Syncfusion® .NET MAUI Scheduler(SfScheduler) control. platform: maui control: SfScheduler documentation: ug From b6bc30f90655b4b1fd145e7c03ea10a1170ed14e Mon Sep 17 00:00:00 2001 From: SriRadheshNag Date: Mon, 13 Oct 2025 22:20:18 +0530 Subject: [PATCH 4/7] Update drag-and-drop-appointments.md --- MAUI/Scheduler/drag-and-drop-appointments.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAUI/Scheduler/drag-and-drop-appointments.md b/MAUI/Scheduler/drag-and-drop-appointments.md index cf1491d47c..e6a32092d3 100644 --- a/MAUI/Scheduler/drag-and-drop-appointments.md +++ b/MAUI/Scheduler/drag-and-drop-appointments.md @@ -1,6 +1,6 @@ --- layout: post -title: Appointment Drag and Drop in .NET MAUI Scheduler Control | Syncfusion® +title: Appointment Drag and Drop in .NET MAUI Scheduler | Syncfusion® description: Learn here all about Appointment drag and drop support in the Syncfusion® .NET MAUI Scheduler(SfScheduler) control. platform: maui control: SfScheduler From aa7dd344c6fabb59f0a66124177a51f7f2ad0789 Mon Sep 17 00:00:00 2001 From: SriRadheshNag Date: Mon, 13 Oct 2025 22:36:47 +0530 Subject: [PATCH 5/7] Update drag-and-drop-appointments.md --- MAUI/Scheduler/drag-and-drop-appointments.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAUI/Scheduler/drag-and-drop-appointments.md b/MAUI/Scheduler/drag-and-drop-appointments.md index e6a32092d3..b4740da794 100644 --- a/MAUI/Scheduler/drag-and-drop-appointments.md +++ b/MAUI/Scheduler/drag-and-drop-appointments.md @@ -1,6 +1,6 @@ --- layout: post -title: Appointment Drag and Drop in .NET MAUI Scheduler | Syncfusion® +title: Appointment Drag and Drop in .NET MAUI Scheduler Control | Syncfusion® description: Learn here all about Appointment drag and drop support in the Syncfusion® .NET MAUI Scheduler(SfScheduler) control. platform: maui control: SfScheduler From e7187f7d8df05bc54e9ccae61e41278cae0045bf Mon Sep 17 00:00:00 2001 From: SriRadheshNag Date: Tue, 14 Oct 2025 10:52:41 +0530 Subject: [PATCH 6/7] updated the pr corrections --- MAUI/Scheduler/drag-and-drop-appointments.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAUI/Scheduler/drag-and-drop-appointments.md b/MAUI/Scheduler/drag-and-drop-appointments.md index b4740da794..824f177fba 100644 --- a/MAUI/Scheduler/drag-and-drop-appointments.md +++ b/MAUI/Scheduler/drag-and-drop-appointments.md @@ -116,9 +116,9 @@ private void OnSchedulerAppointmentDrop(object? sender, AppointmentDropEventArgs {% endhighlight %} {% endtabs %} -### How to prevent dropping appointments into the All-day panel +### Prevent dropping appointments into the all-day panel -You can use the `IsDroppingToAllDay` property to prevent appointments from being dropped into the all-day panel by setting `e.Cancel` as `true`. +You can prevent appointments from being dropped into the all-day panel by checking the `IsDroppingToAllDay` property in the `AppointmentDrop` event and canceling the operation. {% tabs %} {% highlight c# %} From a2360c1815e6fa64437c0ad5bf88d2c658f7f915 Mon Sep 17 00:00:00 2001 From: SriRadheshNag Date: Tue, 14 Oct 2025 11:59:45 +0530 Subject: [PATCH 7/7] Update drag-and-drop-appointments.md --- MAUI/Scheduler/drag-and-drop-appointments.md | 1 - 1 file changed, 1 deletion(-) diff --git a/MAUI/Scheduler/drag-and-drop-appointments.md b/MAUI/Scheduler/drag-and-drop-appointments.md index 824f177fba..1568b82bc7 100644 --- a/MAUI/Scheduler/drag-and-drop-appointments.md +++ b/MAUI/Scheduler/drag-and-drop-appointments.md @@ -127,7 +127,6 @@ scheduler.AppointmentDrop += OnSchedulerAppointmentDrop; private void OnSchedulerAppointmentDrop(object? sender, AppointmentDropEventArgs e) { - var appointment = e.Appointment; if (e.IsDroppingToAllDay) { e.Cancel = true;