在 Monotouch Dialog 中创建视图时,一种可能的方法是创建.cs
包含视图信息的文件,如下所示:
[Caption("Create user")]
[Alignment(UITextAlignment.Center)]
public RegistrationSchema CreateAccount;
但是说我需要动态添加按钮,如下所示:
//This is what I'd like to do, but there doesn't seem to be any support for this
_newUserSection = new Section("Create user) {
new RegistrationSchema()
};
有任何想法吗?
编辑我的RegistrationSchema.cs
文件
public class RegistrationSchema
{
[Section("Fill out the form")]
[Caption("E-mail")]
[Entry(KeyboardType=UIKeyboardType.EmailAddress)]
public string Email;
//more stuff here
}