Example #1
0
            private void DrawDayLabel(RectangleF rect, DateTime date)
            {
                // var r = new RectangleF(new PointF(0, 5), new SizeF {Width = CurrentWidth, Height = 35});
                if (date == DateTime.Today)
                    UIColor.Blue.SetColor ();
                else
                    UIColor.DarkGray.SetColor ();
                RectangleF dayRect = rect.SetSize(new SizeF(rect.Width,35));
                dayRect.Height = dayRect.Height / 2;

                DrawString (date.DayOfWeek.ToString (), dayRect, UIFont.BoldSystemFontOfSize (12), UILineBreakMode.WordWrap, UITextAlignment.Center);

                RectangleF dateRect = dayRect;
                dateRect.Y += dayRect.Height;
                DrawString (date.ToString ("M/d"), dateRect, UIFont.BoldSystemFontOfSize (12), UILineBreakMode.WordWrap, UITextAlignment.Center);
                UIColor.Black.SetColor ();
            }