Skip to content

Instantly share code, notes, and snippets.

@nicwise
Created August 28, 2013 15:53
Show Gist options
  • Save nicwise/6367635 to your computer and use it in GitHub Desktop.
Save nicwise/6367635 to your computer and use it in GitHub Desktop.
public class BTEntryElement : EntryElement, IFocusable
{
public static string key = "BTEntryElement";
public event EventHandler Changed;
public BTEntryElement (string caption, string placeholder, string @value) : base (caption, placeholder, @value)
{
}
public BTEntryElement (string caption, string placeholder, string value, bool isPassword) : base(caption, placeholder, @value, isPassword)
{
}
public UITableViewCellStyle LabelStyle = UITableViewCellStyle.Default;
public override UITableViewCell CreateCell ()
{
return new UITableViewCell (LabelStyle, key);
}
public override UITableViewCell GetCell (UITableView tv)
{
var cell = base.GetCell (tv);
entry.Font = Fonts.HelveticaNeueNormal(16f);
entry.TextColor = Colors.LightDetail;
cell.TextLabel.Font = Fonts.HelveticaNeueBold(16f);
cell.TextLabel.TextColor = Colors.HeaderDark;
cell.ContentView.BringSubviewToFront (entry);
return cell;
}
public void DoChanged ()
{
if (Changed != null)
Changed (this, EventArgs.Empty);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment