We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to change the text colour of the appointment?

I cannot find a way to change the text colour of the appointment?

The appointment uses the default os colour (ios - black / android - white) and I need the appointment text colour to be black on both platforms.

any idea how this can be done?

9 Replies

SP Subburaj Pandian Veluchamy Syncfusion Team January 9, 2017 11:51 AM UTC

Hi Stev, 
 
Thank you for your interest in Syncfusion products. 
 
We have checked your requirement of Changing ScheduleAppointment text color in Xamarin Forms and it can be achievable by setting AppointmentStyle in the Schedule. In AppointmentStyle you can customize the ScheduleAppointment properties. Please find the below code example, 
 
[c#] 
AppointmentStyle appointmentStyle = new AppointmentStyle(); 
appointmentStyle.TextColor = Color.Black; 
schedule. AppointmentStyle = appointmentStyle; 
 
 
If the given solution doesn’t meet your requirement, could you please revert us with more information about your requirement? It will be helpful for us to analyze on it and provide you a better solution. 
 
Regards,  
Subburaj Pandian V.   



AL alecuyer January 10, 2017 09:37 PM UTC

Is there any way to change the text color of the individuals ScheduleAppointment?

There is a ScheduleAppointmtent.Color property which modify the background color,
But let's say that, for some reason, I want a type of appointment black and another type white.

Can I have the black appointments with white text and the white appointments with black text, or is this not currently possible?


SP Subburaj Pandian Veluchamy Syncfusion Team January 11, 2017 09:09 AM UTC

Hi Alecuyer, 
 
Thank you for your interest in Syncfusion products. 
 
We have created a new support incident under your account to track the status of this query. Please log on to our support website to check for further updates. 
 
 
Please let us know if you have any query. 

Regards,  
Subburaj Pandian V.  



SH steve hawkins replied to alecuyer January 16, 2017 04:02 PM UTC

Is there any way to change the text color of the individuals ScheduleAppointment?

There is a ScheduleAppointmtent.Color property which modify the background color,
But let's say that, for some reason, I want a type of appointment black and another type white.

Can I have the black appointments with white text and the white appointments with black text, or is this not currently possible?

[c#] 
AppointmentStyle appointmentStyle = new AppointmentStyle(); 
appointmentStyle.TextColor = Color.Black; 
schedule. AppointmentStyle = appointmentStyle;

Tried this and the text stays white on the appointment even though it has been set to black..

my code:

_Schedule = this.FindByName<SfSchedule>("Schedule");

            AppointmentStyle appStyle = new AppointmentStyle();
            appStyle.TextColor = Color.Black;

            _Schedule.AppointmentStyle = appStyle;





SP Sivakumar Punniya Moorthi Syncfusion Team January 17, 2017 07:21 AM UTC

Hi steve,

Thanks for your interest in Syncfusion products.

We have created a support incident under your account to track the status of this issue. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let us know, if you have any query.

Regards,
Sivakumar P



SY Syncfus August 9, 2017 01:41 AM UTC

You can only change the color for ALL appointments?  Why can't you change it on each individual appointment?



SP Subburaj Pandian Veluchamy Syncfusion Team August 9, 2017 12:32 PM UTC

Hi Syncfus, 
 
Yes, you can change the specific appointment TextColor using OnAppointmentLoadedEvent of Schedule in Xamarin Forms. Please refer the below code example, 
 
[c#] 
schedule.OnAppointmentLoadedEvent += Schedule_OnAppointmentLoadedEvent;

void Schedule_OnAppointmentLoadedEvent(
object sender, AppointmentLoadedEventArgs e)
        {
            var appointment = (e.appointment as ScheduleAppointment);

            AppointmentStyle appointmentStyle = new AppointmentStyle();
            if (appointment.Subject == "Meeting")
                appointmentStyle.TextColor = Color.Red;
            else if (appointment.Subject == "Break")
                appointmentStyle.TextColor = Color.Green;

            e.appointment = appointmentStyle;
        } 
 
 
ScheduleAppointment has default “Color” property to set background Color to the appointment, please refer our online user guide documentation for the same. 
 
 
Please let us know if you have any query on this. 
 
Regards.
Subburaj Pandian V 



AS Asanka replied to Subburaj Pandian Veluchamy August 17, 2017 03:31 AM UTC

Hi Syncfus, 
 
Yes, you can change the specific appointment TextColor using OnAppointmentLoadedEvent of Schedule in Xamarin Forms. Please refer the below code example, 
 
[c#] 
schedule.OnAppointmentLoadedEvent += Schedule_OnAppointmentLoadedEvent;

void Schedule_OnAppointmentLoadedEvent(
object sender, AppointmentLoadedEventArgs e)
        {
            var appointment = (e.appointment as ScheduleAppointment);

            AppointmentStyle appointmentStyle = new AppointmentStyle();
            if (appointment.Subject == "Meeting")
                appointmentStyle.TextColor = Color.Red;
            else if (appointment.Subject == "Break")
                appointmentStyle.TextColor = Color.Green;

            e.appointment = appointmentStyle;
        } 
 
 
ScheduleAppointment has default “Color” property to set background Color to the appointment, please refer our online user guide documentation for the same. 
 
 
Please let us know if you have any query on this. 
 
Regards.
Subburaj Pandian V 


Hi, 

I have done below approach to customize appointments. But it's not affecting to the all day appointments. All day appointments are showing in scheduler without taking any added styles.I realized not firing appointment_loadedevent for all day appointments. Do I needs to add set any other things for that?

Please help me on this.


Thanks






SP Subburaj Pandian Veluchamy Syncfusion Team August 18, 2017 12:34 PM UTC

Hi Asanka, 
 
Thank you for contacting Syncfusion support. 
 
As of now we didn’t consider AllDay appointments in the AppointmentLoaded event, CustomView and AppointmentStyle in Schedule Xamarin Forms, we have considered to implement this support for all day appointments as well. We have logged feature report for the same in our database, we will implement this support in any of our upcoming Volume release and let you know once the implementation has done.   
 
Regards,    
Subburaj Pandian V.      


Loader.
Up arrow icon