How can I make SfSchedule appointments that are ReadOnly solid color?
By default, the ReadOnly appointments of SfSchedule have background color with lower opacity (faded color). You can set solid color to the ReadOnly appointments background using the ReadOnlyVisibility property with help of reflection.
The following code sample demonstrates this.
C#:
PropertyInfo propinfo = readOnlyAppointment.GetType().GetProperty("ReadOnlyVisibility", BindingFlags.Instance |BindingFlags.Public); propinfo.SetValue(readOnlyAppointment, Visibility.Collapsed); readOnlyAppointment.AppointmentBackground = new SolidColorBrush(Colors.Red); |
VB:
PropertyInfo propinfo = readOnlyAppointment.GetType().GetProperty("ReadOnlyVisibility", BindingFlags.Instance |BindingFlags.Public) propinfo.SetValue(readOnlyAppointment, Visibility.Collapsed) readOnlyAppointment.AppointmentBackground = New SolidColorBrush(Colors.Red) |
Sample
C#: https://www.syncfusion.com/downloads/support/forum/143920/ze/CSharp1627790571
I hope you enjoyed learning about how to make SfSchedule appointments that are ReadOnly solid color?
You can refer to our WPF Scheduler's feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications.
For current customers, you can check out our WPF controls 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 forums, Direct-Trac, or feedback portal. We are always happy to assist you!