0
有沒有人有關於如何在MonoTouch EntryElement類上實現ShouldChangeCharacters事件的代碼示例或任何建議?C#Monotouch/Xamarin - EntryElement ShouldChangeCharacters事件
大概我需要繼承EntryElement和實施的UITextField(具有ShouldChangeCharacters事件)......但我沒有揭露事件的很多經驗繼承類時等
看來我應該做到以下幾點,但我該如何公開這個ShouldChangeCharacters事件?
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;
}
}
基本上我希望能夠鍵入:
MyEntryElement test = new MyEntryElement();
test.ShouldChangeCharacters += etc....