Articles in this section

How to customize the month cell using DataTemplate in the .NET MAUI Scheduler (SfScheduler)?

The .NET MAUI Scheduler allows you to customize the month cells with specific UI requirements using data templates. This customization can be done through the CellTemplate property of the MonthView.

The binding context of the CellTemplate is SchedulerMonthCellDetails, you can use the binding context properties in the data template based on your requirement.

XAML

<?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="MonthCellTemplate.MainPage"
             BackgroundColor="{DynamicResource SecondaryColor}"
             xmlns:scheduler="clr-namespace:Syncfusion.Maui.Scheduler;assembly=Syncfusion.Maui.Scheduler">
    <Grid>
        <Grid.Resources>
            <DataTemplate x:Key="cellTemplate">
                <Grid Background = "LightBlue">
                    <Label HorizontalTextAlignment="Center" TextColor="Black" Text="{Binding DateTime.Day}"/>
                </Grid>
            </DataTemplate>
        </Grid.Resources>
        <scheduler:SfScheduler x:Name="Scheduler" 
                           View="Month">
            <scheduler:SfScheduler.MonthView>
                <scheduler:SchedulerMonthView CellTemplate="{StaticResource cellTemplate}"/>
            </scheduler:SfScheduler.MonthView>
        </scheduler:SfScheduler>
    </Grid>
</ContentPage>
 

 Output

Month cell template MAUI Scheduler

 

 

Download the complete sample on GitHub

Conclusion

I hope you enjoyed learning how to customize the month cell using DataTemplate in the .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)
Access denied
Access denied