Articles in this section
Category / Section

How to customize the appointments count view in .NET MAUI Scheduler?

2 mins read

The .NET MAUI Scheduler displays all-day and span appointments in separate layouts for day, week, and workweek views. You can customize the "More" appointments count view to display the count of expandable all-day or span appointments using the MoreAppointmentsTemplate property in the DaysView of the Scheduler.

Note:

This feature is applicable only for day, week, and workweek views.

 

The BindingContext of the MoreAppointmentsTemplate is expandable more appointments count value in the all-day layout. 

 

XAML

Add the template more appointments.

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="MoreAppointmentTemplate.MainPage"
             BackgroundColor="{DynamicResource SecondaryColor}"
             xmlns:local="clr-namespace:MoreAppointmentTemplate">
    <Grid>
        <Grid.Resources>
            <DataTemplate x:Key="moreAppointmentsTemplate">
                <StackLayout Background="LightGreen" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
                    <Label Text="{Binding}" TextColor="Black" HorizontalTextAlignment="Center" VerticalTextAlignment="Center">
                    </Label>
                </StackLayout>
            </DataTemplate>
        </Grid.Resources>
        <scheduler:SfScheduler x:Name="Scheduler" 
                           View="Day">
            <scheduler:SfScheduler.AppointmentMapping>
                <scheduler:SchedulerAppointmentMapping
                        Subject="EventName"
                        StartTime="From"
                        EndTime="To"
                        Background="Background"
                        IsAllDay="IsAllDay"
                        StartTimeZone="StartTimeZone"
                        EndTimeZone="EndTimeZone"
                        RecurrenceExceptionDates="RecurrenceExceptions"
                        RecurrenceRule="RecurrenceRule"
                        RecurrenceId="RecurrenceId"/>
            </scheduler:SfScheduler.AppointmentMapping>
            <scheduler:SfScheduler.DaysView>
                <scheduler:SchedulerDaysView
                               MoreAppointmentsTemplate="{StaticResource moreAppointmentsTemplate}"/>
            </scheduler:SfScheduler.DaysView>
            <scheduler:SfScheduler.Behaviors>
                <local:ScheduleBehavior/>
            </scheduler:SfScheduler.Behaviors>
        </scheduler:SfScheduler>
    </Grid>
</ContentPage>

 Output

More appointments template in MAUI Scheduler

 

Download the complete sample on GitHub

Conclusion

I hope you enjoyed learning about how to customize the appointments count view in .NET MAUI Scheduler.

You can refer to our .NET MAUI Scheduler feature tour page to know about its other groundbreaking feature representations. Explore our .NET MAUI Scheduler documentation to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied