Ejemplo n.º 1
0
		public override void UpdateVisualsForCell (TKCalendar calendar, TKCalendarCell cell)
		{
			cell.Style.TextColor = new UIColor (1f, 1f, 1f, 1f);
			cell.Style.BottomBorderWidth = 0;
			cell.Style.TopBorderWidth = 0;
			cell.Style.TextFont = UIFont.SystemFontOfSize (10);
			cell.Style.ShapeFill = new TKSolidFill(new UIColor(1f, 1f, 1f,  1f));

			if(cell.IsKindOfClass(new ObjCRuntime.Class(typeof(TKCalendarDayCell))))
			{
				TKCalendarDayCell dayCell = (TKCalendarDayCell)cell;
				if ((dayCell.State & TKCalendarDayState.Selected) != 0)
				{
					dayCell.Style.TextColor = new UIColor(0.5f, 0.7f,  0.2f, 1f);
				}
			}

			if(cell.IsKindOfClass(new ObjCRuntime.Class(typeof(TKCalendarDayNameCell))))
			{
				TKCalendarDayNameCell dayNameCell = (TKCalendarDayNameCell)cell;
				dayNameCell.Label.Text = dayNameCell.Label.Text.Substring (0, 1);
			}

			if (cell.IsKindOfClass(new ObjCRuntime.Class(typeof(TKCalendarMonthTitleCell)))) {
				TKCalendarMonthTitleCell titleCell = (TKCalendarMonthTitleCell)cell;
				titleCell.LayoutMode = TKCalendarMonthTitleCellLayoutMode.MonthWithButtons;
			}
		}
Ejemplo n.º 2
0
        public override void UpdateVisualsForCell(TKCalendar calendar, TKCalendarCell cell)
        {
            cell.Style.TextColor         = new UIColor(1f, 1f, 1f, 1f);
            cell.Style.BottomBorderWidth = 0;
            cell.Style.TopBorderWidth    = 0;
            cell.Style.TextFont          = UIFont.SystemFontOfSize(10);
            cell.Style.ShapeFill         = new TKSolidFill(new UIColor(1f, 1f, 1f, 1f));

            if (cell.IsKindOfClass(new ObjCRuntime.Class(typeof(TKCalendarDayCell))))
            {
                TKCalendarDayCell dayCell = (TKCalendarDayCell)cell;
                if ((dayCell.State & TKCalendarDayState.Selected) != 0)
                {
                    dayCell.Style.TextColor = new UIColor(0.5f, 0.7f, 0.2f, 1f);
                }
            }

            if (cell.IsKindOfClass(new ObjCRuntime.Class(typeof(TKCalendarDayNameCell))))
            {
                TKCalendarDayNameCell dayNameCell = (TKCalendarDayNameCell)cell;
                dayNameCell.Label.Text = dayNameCell.Label.Text.Substring(0, 1);
            }

            if (cell.IsKindOfClass(new ObjCRuntime.Class(typeof(TKCalendarMonthTitleCell))))
            {
                TKCalendarMonthTitleCell titleCell = (TKCalendarMonthTitleCell)cell;
                titleCell.LayoutMode = TKCalendarMonthTitleCellLayoutMode.MonthWithButtons;
            }
        }
Ejemplo n.º 3
0
 public override void UpdateVisualsForCell(TKCalendar calendar, TKCalendarCell cell)
 {
     if (cell.IsKindOfClass(new ObjCRuntime.Class(typeof(TKCalendarMonthTitleCell))))
     {
         TKCalendarMonthTitleCell monthTitleCell = (TKCalendarMonthTitleCell)cell;
         monthTitleCell.LayoutMode = TKCalendarMonthTitleCellLayoutMode.MonthAndYearWithButotns;
     }
 }
Ejemplo n.º 4
0
 public override void UpdateVisualsForCell(TKCalendar calendar, TKCalendarCell cell)
 {
     if (cell.IsKindOfClass(new ObjCRuntime.Class(typeof(TKCalendarMonthTitleCell)))) {
         TKCalendarMonthTitleCell monthTitleCell = (TKCalendarMonthTitleCell)cell;
         monthTitleCell.LayoutMode = TKCalendarMonthTitleCellLayoutMode.MonthAndYearWithButotns;
     }
 }