I'm evaluating the xamarin version of the telerik calendar and I've been struggling with styling events. There seem to be examples of how to change the shape of an event, but when I implement those examples, the text of the event goes away. There also does not seem to be any way to globally set this for all events. so here's what I'm doing so far:
RadCalendarView calendarView = FindViewById<RadCalendarView>(Resource.Id.calendarView);
calendarView.Adapter.Style = Com.Telerik.Widget.Calendar.CalendarStyles.MaterialDark(this);
which sets the style mostly how I want, but the text is black of the events and I want it to be white. so I overrode the EventRenderer and that's when the text goes away.
public class MyEventRenderer : EventRenderer
{
private Paint paint;
public MyEventRenderer(Context context)
: base(context)
{
paint = new Paint();
paint.AntiAlias = true;
}
public override void RenderEvents(Android.Graphics.Canvas canvas, CalendarDayCell cell)
{
int desiredOffset = 20;
int shapeRadius = 10;
int locationX = cell.Left + 20;
int locationY = cell.Top + 50;
cell.TextColor = Android.Graphics.Color.ParseColor("#FFFFFF");
foreach (Event e in cell.Events)
{
this.paint.Color = new Android.Graphics.Color(e.EventColor);
canvas.DrawCircle(locationX, locationY, shapeRadius, this.paint);
locationY += shapeRadius + desiredOffset;
}
}
}
Please let me know what I'm missing. thanks, Craig