Does anyone have a code sample or any advice on how I can implement the ShouldChangeCharacters event on the monotouch EntryElement class?
Presumably I need to inherit EntryElement and implement a UITextField (which has the ShouldChangeCharacters event).....but I don't have much experience in exposing events when inheriting classes etc.
It seems that I should be doing the following, but how do I expose this ShouldChangeCharacters event?
using MonoTouch.Dialog;
using MonoTouch.UIKit;
class MyEntryElement : EntryElement
{
protected override UITextField CreateTextField(RectangleF frame)
{
var field = base.CreateTextField(frame);
//How do I expose this?
//field.ShouldChangeCharacters
return field;
}
}
Essentially I want to be able to type:
MyEntryElement test = new MyEntryElement ();
test.ShouldChangeCharacters += etc....