예제 #1
0
        public virtual UITableViewElementCell NewCell()
        {
            var cell = new UITableViewElementCell(Theme.CellStyle, Id, this);

            cell.Element = this;
            return(cell);
        }
예제 #2
0
        public override UITableViewElementCell NewCell()
        {
            var style = Theme.CellStyle;

            var cell = new UITableViewElementCell(style, Id, this);

            return(cell);
        }
예제 #3
0
 protected void SetDisabled(UITableViewElementCell cell)
 {
     if (cell != null)
     {
         _DisabledCellView = new DisabledCellView(cell);
         cell.AddSubview(_DisabledCellView);
         cell.SetNeedsDisplay();
     }
 }
예제 #4
0
        public DisabledCellView(UITableViewElementCell cell) : base(cell.Bounds)
        {
            BackgroundColor = UIColor.Clear;
            Opaque          = false;

            if (cell != null)
            {
                _Cell  = cell;
                Bounds = _Cell.CalculateInnerRect();
            }
        }
예제 #5
0
		public void DrawContentView(RectangleF rect, CGContext context, UITableViewElementCell cell)
		{
			context.SaveState();
			float r = 0;
			float g = 0;
			float b = 0;

			var gradient = new CGGradient(CGColorSpace.CreateDeviceRGB(), new float[] { r, g, b, 0.20f, r, g, b, 0.40f }, new float[] { 0, 1 });			
			context.DrawLinearGradient(gradient, new PointF(rect.Left, rect.Top), new PointF(rect.Left, rect.Bottom), CGGradientDrawingOptions.DrawsBeforeStartLocation);

			context.RestoreState();
		}
예제 #6
0
        public void DrawContentView(RectangleF rect, CGContext context, UITableViewElementCell cell)
        {
            context.SaveState();
            float r = 0;
            float g = 0;
            float b = 0;

            var gradient = new CGGradient(CGColorSpace.CreateDeviceRGB(), new float[] { r, g, b, 0.20f, r, g, b, 0.40f }, new float[] { 0, 1 });

            context.DrawLinearGradient(gradient, new PointF(rect.Left, rect.Top), new PointF(rect.Left, rect.Bottom), CGGradientDrawingOptions.DrawsBeforeStartLocation);

            context.RestoreState();
        }
예제 #7
0
		public void DrawContentView(RectangleF rect, CGContext context, UITableViewElementCell cell)
		{
			context.SaveState();
			
			var backgroundColor = CellBackgroundColor;
			if (backgroundColor != null)
			{
				if (backgroundColor == UIColor.Clear)
					backgroundColor = UIColor.White;
				
				context.SetFillColorWithColor(backgroundColor.ColorWithAlpha(0.4f).CGColor);
				context.SetBlendMode(CGBlendMode.Overlay);
				context.FillRect(rect);
			}
			
			context.RestoreState();
		}
예제 #8
0
        public void DrawContentView(RectangleF rect, CGContext context, UITableViewElementCell cell)
        {
            context.SaveState();

            var backgroundColor = CellBackgroundColor;

            if (backgroundColor != null)
            {
                if (backgroundColor == UIColor.Clear)
                {
                    backgroundColor = UIColor.White;
                }

                context.SetFillColorWithColor(backgroundColor.ColorWithAlpha(0.4f).CGColor);
                context.SetBlendMode(CGBlendMode.Overlay);
                context.FillRect(rect);
            }

            context.RestoreState();
        }
예제 #9
0
        public void DrawContentView(RectangleF rect, CGContext context, UITableViewElementCell cell)
        {
            var gradientFrame = rect;

            var shineFrame = gradientFrame;

            shineFrame.Y     += 1;
            shineFrame.X     += 1;
            shineFrame.Width -= 2;
            shineFrame.Height = (shineFrame.Height / 2);

            CGColorSpace colorSpace = CGColorSpace.CreateDeviceRGB();

            var gradient = new CGGradient(
                colorSpace,
                new float[] { 0f, 0f, 0f, 0.70f,
                              0f, 0f, 0f, 0.40f },
                new float[] { 0, 1 });

            var shineGradient = new CGGradient(
                colorSpace,
                new float[] { 1f, 1f, 1f, 0.80f,
                              1f, 1f, 1f, 0.10f },
                new float[] { 0, 1 });

            if (Cell != null && Cell.Highlighted)
            {
                context.SetFillColorWithColor(HighlightColor.CGColor);
            }
            else
            {
                context.SetFillColorWithColor(CellBackgroundColor.CGColor);
            }
            context.FillRect(rect);

            context.DrawLinearGradient(gradient, new PointF(gradientFrame.Left, gradientFrame.Top), new PointF(gradientFrame.Left, gradientFrame.Bottom), CGGradientDrawingOptions.DrawsAfterEndLocation);
            context.DrawLinearGradient(shineGradient, new PointF(shineFrame.Left, shineFrame.Top), new PointF(shineFrame.Left, shineFrame.Bottom), CGGradientDrawingOptions.DrawsAfterEndLocation);
        }
예제 #10
0
		public void DrawContentView(RectangleF rect, CGContext context, UITableViewElementCell cell)
		{
			var gradientFrame = rect;
			
			var shineFrame = gradientFrame;
			shineFrame.Y += 1;
			shineFrame.X += 1;
			shineFrame.Width -= 2;
			shineFrame.Height = (shineFrame.Height / 2);

			CGColorSpace colorSpace = CGColorSpace.CreateDeviceRGB();

			var gradient = new CGGradient(
			    colorSpace,
			    new float[] { 0f, 0f,0f, 0.70f, 
							  0f, 0f, 0f, 0.40f},
				new float[] { 0, 1 } );

			var shineGradient = new CGGradient(
			    colorSpace,
			    new float[] { 1f, 1f, 1f, 0.80f, 
							  1f, 1f, 1f, 0.10f},
				new float[] { 0, 1 } );
			
			if (Cell != null && Cell.Highlighted)
			{
				context.SetFillColorWithColor(HighlightColor.CGColor);
			}
			else
			{
				context.SetFillColorWithColor(CellBackgroundColor.CGColor);
			}
			context.FillRect(rect);
	
			context.DrawLinearGradient(gradient, new PointF(gradientFrame.Left, gradientFrame.Top), new PointF(gradientFrame.Left, gradientFrame.Bottom), CGGradientDrawingOptions.DrawsAfterEndLocation);		
			context.DrawLinearGradient(shineGradient, new PointF(shineFrame.Left, shineFrame.Top), new PointF(shineFrame.Left, shineFrame.Bottom), CGGradientDrawingOptions.DrawsAfterEndLocation);
		}
예제 #11
0
		public override UITableViewElementCell NewCell()
		{
			var style = Theme.CellStyle;
			
			var cell = new UITableViewElementCell(style, Id, this);

			return cell;
		}
예제 #12
0
		public void DrawContentView(RectangleF rect, CGContext context, UITableViewElementCell cell)
		{
			context.DrawLinearGradient(gradient, new PointF(rect.Left, rect.Top), new PointF(rect.Left, rect.Bottom), CGGradientDrawingOptions.DrawsBeforeStartLocation);
			cell.ShouldDrawBorder = true;
		}
예제 #13
0
 public void DrawContentView(RectangleF rect, CGContext context, UITableViewElementCell cell)
 {
     CellBackgroundColor.SetFill();
     context.FillRect(rect);
 }
예제 #14
0
        private void InitializePropertiesFromCell(UITableViewElementCell cell)
        {
            if (cell != null)
            {
                _Cell = cell;

                if (Cell.Accessory != UITableViewCellAccessory.None && Accessory == UITableViewCellAccessory.None)
                {
                    Accessory = Cell.Accessory;
                }

                if (Cell.ImageView != null && CellImageIcon == null)
                {
                    CellImageIcon = Cell.ImageView.Image;
                }

                if (TextLabel != null)
                {
                    if (TextFont == null)
                    {
                        TextFont = cell.TextLabel.Font;
                    }

                    if (TextColor == null)
                    {
                        TextColor = cell.TextLabel.TextColor;
                    }

                    if (TextShadowOffset == SizeF.Empty)
                    {
                        TextShadowOffset = cell.TextLabel.ShadowOffset;
                    }

                    if (TextShadowColor == null)
                    {
                        TextShadowColor = cell.TextLabel.ShadowColor;
                    }
                }
                else
                {
                    TextLabel = Cell.TextLabel;
                }

                if (DetailTextLabel != null)
                {
                    if (DetailTextFont == null)
                    {
                        DetailTextFont = cell.DetailTextLabel.Font;
                    }

                    if (DetailTextColor == null)
                    {
                        DetailTextColor = cell.DetailTextLabel.TextColor;
                    }

                    if (DetailTextShadowOffset == SizeF.Empty)
                    {
                        DetailTextShadowOffset = cell.DetailTextLabel.ShadowOffset;
                    }

                    if (DetailTextShadowColor == null)
                    {
                        DetailTextShadowColor = cell.DetailTextLabel.ShadowColor;
                    }
                }
                else
                {
                    DetailTextLabel = Cell.DetailTextLabel;
                }

                Cell.SetNeedsDisplay();
            }
        }
예제 #15
0
		public void DrawContentView(RectangleF rect, CGContext context, UITableViewElementCell cell)
		{
			CellBackgroundColor.SetFill();
			context.FillRect(rect);
		}
예제 #16
0
		protected void SetDisabled(UITableViewElementCell cell)
		{
			if (cell != null)
			{
				_DisabledCellView = new DisabledCellView(cell);
				cell.AddSubview(_DisabledCellView);
				cell.SetNeedsDisplay();
			}
		}
		public DisabledCellView(UITableViewElementCell cell) : base(cell.Bounds)
		{		
			BackgroundColor = UIColor.Clear;
			Opaque = false;

			if(cell != null)
			{
				_Cell = cell;
				Bounds = _Cell.CalculateInnerRect();
			}
		}
		public UITableViewCellContentView(UITableViewElementCell cell) : base(cell.Bounds)
		{
			Cell = cell;
			Opaque = false;
		}
예제 #19
0
 public void DrawContentView(RectangleF rect, CGContext context, UITableViewElementCell cell)
 {
     context.DrawLinearGradient(gradient, new PointF(rect.Left, rect.Top), new PointF(rect.Left, rect.Bottom), CGGradientDrawingOptions.DrawsBeforeStartLocation);
     cell.ShouldDrawBorder = true;
 }
예제 #20
0
 public UITableViewCellContentView(UITableViewElementCell cell) : base(cell.Bounds)
 {
     Cell   = cell;
     Opaque = false;
 }
예제 #21
0
		private void InitializePropertiesFromCell(UITableViewElementCell cell)
		{
			if (cell != null)
			{
				_Cell = cell;
 
				if (Cell.Accessory != UITableViewCellAccessory.None && Accessory == UITableViewCellAccessory.None)
					Accessory = Cell.Accessory;

				if (Cell.ImageView != null && CellImageIcon == null)
					CellImageIcon = Cell.ImageView.Image;
				
				if (TextLabel != null)
				{
//					if (TextFont == null)
//						TextFont = cell.TextLabel.Font;
	
					if (TextColor == null)
						TextColor = cell.TextLabel.TextColor;
				
					if (TextShadowOffset == SizeF.Empty)
						TextShadowOffset = cell.TextLabel.ShadowOffset;
	
					if (TextShadowColor == null)
						TextShadowColor = cell.TextLabel.ShadowColor;
				}
				else
					TextLabel = Cell.TextLabel;

				if (DetailTextLabel != null)
				{
//					if (DetailTextFont == null)
//						DetailTextFont = cell.DetailTextLabel.Font;
					
					if (DetailTextColor == null)
						DetailTextColor = cell.DetailTextLabel.TextColor;
					
					if (DetailTextShadowOffset == SizeF.Empty)
						DetailTextShadowOffset = cell.DetailTextLabel.ShadowOffset;
					
					if (DetailTextShadowColor == null)
						DetailTextShadowColor = cell.DetailTextLabel.ShadowColor;
				}
				else
					DetailTextLabel = Cell.DetailTextLabel;
				
				Cell.SetNeedsDisplay();
			}
		}
예제 #22
0
		public virtual UITableViewElementCell NewCell()
		{
			var cell = new UITableViewElementCell(Theme.CellStyle, Id, this);
			cell.Element = this;
			return cell;
		}