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
close icon

ReadOnly appointment opacity

Hello,

I was wondering if it is possible to create a ReadOnly appointment with a solid color background.
If a solid background color is assigned to a ReadOnly appointment, it seems to render differently then when the appointment can be edited. It looks like the opacity property of the appointment has changed. Is is possible to disable this behavior?

Thank you in advance!

3 Replies

JP Jagadeesan Pichaimuthu Syncfusion Team April 11, 2019 09:19 AM UTC

Hi Lon Hofman,  
  
Thanks for using Syncfusion product. 
 
In SfSchedule, we have maintained separate opacity value for ReadOnly appointments to show difference from normal appointments. We cannot set solid color for ReadOnly appointments. This is not original behavior of SfSchedule control. We have updating the color for ReadOnly appointments based on ReadOnlyVisibility property but we have maintaining internal setter for this property. But it is possible to set solid color for ReadOnly appointments based on ReadOnlyVisibility  property. We have also prepared a sample for the same in which we have set the solid color for ReadOnly appointments using ReadOnlyVisibility  property by reflection. Please find the code snippet and sample from the below location. 
 
Code Snippet: 
PropertyInfo propinfo = readOnlyAppointment.GetType().GetProperty("ReadOnlyVisibility", BindingFlags.Instance |BindingFlags.Public); 
propinfo.SetValue(readOnlyAppointment, Visibility.Collapsed); 
readOnlyAppointment.AppointmentBackground = new SolidColorBrush(Colors.Red); 
 
 
 
Let us know whether this helps also if you need any further assistance on this. 
 
Regards, 
Jagadeesan 



LH Lon Hofman April 11, 2019 10:06 AM UTC

Thank you very much!
Your solution seems to work as expected.

Kind regards,


JP Jagadeesan Pichaimuthu Syncfusion Team April 11, 2019 10:54 AM UTC

Hi Lon Hofman, 

Thanks for the update. 

We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 

Regards, 
Jagadeesan 


Loader.
Live Chat Icon For mobile
Up arrow icon