Extending CellDecorator

2 posts, 1 answers
  1. Hailton
    Hailton avatar
    1 posts
    Member since:
    Mar 2015

    Posted 06 May 2015 Link to this post

            Android.Content.Context _context;
            public MyCalendarDecorator (RadCalendarView calendarView, float s) : base (calendarView, s)
                _context = calendarView.Context;
            public override void RenderLayer (int p0, Android.Graphics.Canvas p1)
                if (CellsForDecoration.ContainsKey (p0)) {
                    var cellsForLayer = CellsForDecoration.Get (p0) as Java.Util.AbstractList;
                    if (cellsForLayer.Size() > 0) {
                        for (int i = 0; i < cellsForLayer.Size(); i++) {
    ****Here I want the cell properties (width, VirtualLeft and VirtualTop)
  2. Answer
    Ves avatar
    2926 posts

    Posted 11 May 2015 Link to this post

    Hi Hailton,

    You can cast the cell like this:
    var cell = cellsForLayer.Get (i).JavaCast<CalendarDayCell>();

    then you will be able to retrieve the properties of cell. Note that in order to use JavaCast method, you will need to include this line in your file:
    using Android.Runtime;

    Best regards,

    See What's Next in App Development. Register for TelerikNEXT.

Back to Top