あなたが示した例では、Monotouch.Dialog の単純な Reflection API を使用しています。これは便利で簡単ですが、実際にできることが制限されます。Monotouch.Dialog のここ ( http://docs.xamarin.com/guides/ios/user_interface/monotouch.dialog/elements_api_walkthrough ) にある Elements API の使用方法を学習することをお勧めします。これにより、各項目をより詳細に制御できます。テーブル、および変更などを検出できるようにします。
表の各セル (たとえば、名前は編集可能なセルです) には、テキストの変更など、特定のことが発生したときのアクション/イベントがあります。
たとえば、上記の画面は、要素 API を使用して次のように作成できます。
public class ExpenseViewController : DialogViewController
{
EntryElement nameEntry;
public ExpenseViewController() : base(null, true)
{
Root = CreateRootElement();
// Here is where you can handle text changing
nameEntry.Changed += (sender, e) => {
SaveEntryData(); // Make your own method of saving info.
};
}
void CreateRootElement(){
return new RootElement("Expense Form"){
new Section("Expense Entry"){
(nameEntry = new EntryElement("Name", "Enter expense name", "", false))
},
new Section("Expense Details"){
new EntryElement("Description", "", "", false),
new BooleanElement("Approved", false, ""),
new RootElement("Category", new Group("Categories")){
new CheckboxElement("Travel", true, "Categories"),
new CheckboxElement("Personal", false, "Categories"),
new CheckboxElement("Other", false, "Categories")
}
}
};
}
void SaveEntryData(){
// Implement some method for saving data. e.g. to file, or to a SQLite database.
}
}
Elements API の使用を開始するには、次の領域を考慮してください。 ソース: https://github.com/migueldeicaza/MonoTouch.Dialog
MT.D イントロ: http://docs.xamarin.com/guides/ios/user_interface/monotouch.dialog
MT.D 要素のチュートリアル: http://docs.xamarin.com/guides/ios/user_interface/monotouch.dialog/elements_api_walkthrough