I subclassed EntryElement and have set the UILineBreakMode
in the GetCell method as such:
public class EntryElementEnhanced : EntryElement, IElementSizing
{
public EntryElementEnhanced(string caption, string placeholder, string value) : base (caption, placeholder, value) {}
public float GetHeight(UITableView view, NSIndexPath indexPath)
{
return 100.0f; //arbitrary number just for testing
}
public override UITableViewCell GetCell (UITableView tv)
{
var cell = base.GetCell (tv);
cell.TextLabel.LineBreakMode = UILineBreakMode.WordWrap;
cell.TextLabel.Lines = 0;
return cell;
}
}
This does not seem to make the text that gets entered into the cell word-wrapped. Should I be setting this somewhere else?
If someone knows a better approach, what I'm trying to accomplish at a higher level is I want to create the equivalent of an UITextArea in MonoTouch.Dialog.
GetCell
method fromEntryElement
,entry.ShouldEndEditing += delegate
tries to referenceroot.Sections
. This is an internal list that I can't access in my subclass. Any ideas for a workaround? – Kilmarnock