public virtual UITableViewElementCell NewCell() { var cell = new UITableViewElementCell(Theme.CellStyle, Id, this); cell.Element = this; return(cell); }
public override UITableViewElementCell NewCell() { var style = Theme.CellStyle; var cell = new UITableViewElementCell(style, Id, this); return(cell); }
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 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(); }
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(); }
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(); }
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); }
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); }
public override UITableViewElementCell NewCell() { var style = Theme.CellStyle; var cell = new UITableViewElementCell(style, Id, this); return cell; }
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; }
public void DrawContentView(RectangleF rect, CGContext context, UITableViewElementCell cell) { CellBackgroundColor.SetFill(); context.FillRect(rect); }
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(); } }
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; }
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(); } }
public virtual UITableViewElementCell NewCell() { var cell = new UITableViewElementCell(Theme.CellStyle, Id, this); cell.Element = this; return cell; }