Articles in this section

How to customize the month cell style in the .NET MAUI Scheduler (SfScheduler) month view?

In the .NET MAUI Scheduler, you can customize the month cell style using the properties of the SchedulerMonthCellStyle class. This allows you to modify the appearance of the days displayed in the month view, including the styling for current, leading, and trailing month days. 


XAML

Initialize the Scheduler with the required properties.

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="LeadTrailDatesCustomization.MainPage"
             BackgroundColor="{DynamicResource SecondaryColor}"
             xmlns:scheduler="clr- namespace:Syncfusion.Maui.Scheduler;assembly=Syncfusion.Maui.Scheduler">
    <Grid>
        <scheduler:SfScheduler x:Name="Scheduler" View="Month">
        </scheduler:SfScheduler>
    </Grid>
</ContentPage>

CS

 Customize the month cell style in the code-behind.

public MainPage()
{
  InitializeComponent();
 
        var leadingMonthTextStyle = new SchedulerTextStyle()
        {
            TextColor = Colors.Red,
            FontSize = 14,
        };
 
        var trailingMonthTextStyle = new SchedulerTextStyle()
        {
            TextColor = Colors.Red,
            FontSize = 14,
        };
 
        var currentMonthTextStyle = new SchedulerTextStyle()
        {
            TextColor = Colors.White,
            FontSize = 16,
        };
 
        var monthCellStyle = new SchedulerMonthCellStyle()
        {
            Background = Brush.LightSkyBlue,
            TodayBackground = Brush.LightSkyBlue,
            LeadingMonthBackground = Brush.LightGreen,
            TrailingMonthBackground = Brush.LightGreen,
            TextStyle = currentMonthTextStyle,
            LeadingMonthTextStyle = leadingMonthTextStyle,
            TrailingMonthTextStyle = trailingMonthTextStyle,
        };
 
        this.Scheduler.MonthView.CellStyle = monthCellStyle;
    }

 Output

MAUI Scheduler month cell style customization.


Conclusion

I hope you enjoyed learning how to customize the month cell style in the .NET MAUI Scheduler's month view.

Refer to our .NET MAUI Scheduler feature tour page to learn about its other groundbreaking feature representations. You can explore our .NET MAUI Scheduler documentation to understand how to present and manipulate data.

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

Please let us know in the following comments section if you have any queries or require clarifications. 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