This is a migrated thread and some comments may be shown as answers.

Extending CellDecorator

1 Answer 25 Views
Calendar & Scheduling
This is a migrated thread and some comments may be shown as answers.
Hailton
Top achievements
Rank 1
Hailton asked on 06 May 2015, 07:02 PM
        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)

1 Answer, 1 is accepted

Sort by
0
Accepted
Ves
Telerik team
answered on 11 May 2015, 01:18 PM
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,
Ves
Telerik
 

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

 
Tags
Calendar & Scheduling
Asked by
Hailton
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or