You almost have it, just make field
a class-level variable, and make a public property for it. You could also just make a property for an event, and give that to the field, but I think that is slightly more complicated.
class MyEntryElement : EntryElement
{
UITextField field; // Class-level variable
protected override UITextField CreateTextField(RectangleF frame)
{
field = base.CreateTextField(frame);
//How do I expose this?
//field.ShouldChangeCharacters
return field;
}
public UITextField Field {
get { return field; }
}
}
Now you can do this:
MyEntryElement test = new MyEntryElement ();
test.Field.ShouldChangeCharacters += etc....