Articles in this section
Category / Section

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

3 mins read

.NET MAUI Scheduler displays all-day and span appointments in separate all-day appointment layouts for day, week, and workweek views. You can customize the more appointments count view to display the expandable more all day or span appointments count value in the all-day appointment layouts by using the MoreAppointmentsTemplate in DaysView of the scheduler.

Note:

It 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>

 

View Sample on GitHub.

More appointments template in MAUI Scheduler

 

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 Schedule feature tour page to know about its other groundbreaking feature representations. You can also explore our .NET MAUI Schedule 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