SfSchedule MonthView cell text color

Hi,

How can I change appointment text color for MonthView?

I've tried setting like this:

            <sf:SfSchedule.MonthCellStyle>

                <sf:MonthViewCellStyle TextColor="Black"/>

            </sf:SfSchedule.MonthCellStyle>

but still shows in white color.

Setting ApointmentStyle works for DayView and WorkView, but not for MonthView:

<sf:SfSchedule.AppointmentStyle>

                <sf:AppointmentStyle TextColor="{StaticResource DarkTextColor}"/>

            </sf:SfSchedule.AppointmentStyle>

Is there another setting I'm missing?


1 Reply

SS SaiGanesh Sakthivel Syncfusion Team November 29, 2021 10:48 AM UTC

Hi Ernest,   
   
Thank you for using syncfusion products.   
   
#Regarding Customize the appointment in the month view.   
We have checked the reported query from our end. Your requirement can be achieved with the help of DataTemplateSelector in SfSchedule. please refer to the following code snippet for your reference.   
  
Code Snippet   
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)   
{   
    var schedule = container as SfSchedule;   
    ViewModel.MonthCellItem = item as MonthCellItem;   
    if (schedule != null)   
    {   
        var appointments = (IList)(item as MonthCellItem).Appointments;   
        //// multiple appointment template   
        if (appointments != null && appointments.Count > 2 )   
            return MonthCellAppointmentTemplate;   
        //// single appointment template    
        else if (appointments != null && appointments.Count == 1)   
            return MonthCellSingleAppointment;   
        //// double appointment template   
        else if (appointments != null && appointments.Count == 2)   
            return MonthCellDoubleAppointment;   
        //// normal template   
        else   
            {   
            return MonthCellTemplate;   
            }         
    }   
    return null;   
}   
   
We have prepared the demo sample as per your requirement. Please refer to the sample in the following locations.   
   
   
 
Please let us know if you have any concerns.   
   
Regards,
SaiGanesh Sakthivel
 


Loader.
Up arrow icon