获取密码字段的Monotouch.Dialog InputElement

获取密码字段的Monotouch.Dialog InputElement,mono,xamarin.ios,monotouch.dialog,Mono,Xamarin.ios,Monotouch.dialog,我试图从EntryElement获取值 var password = new EntryElement("Password","Password",null,true); 我有一个StyledStringElement,它有一个单击事件,如 new Section() { new StyledStringElement ("Login", delegate {

我试图从EntryElement获取值

    var password = new EntryElement("Password","Password",null,true);
我有一个StyledStringElement,它有一个单击事件,如

    new Section()
                    {
                        new StyledStringElement ("Login", delegate {
                        Console.Write (string.Format("Password is {0}",password.Value));
                        Console.Write (string.Format("Email is {0}",email.Value));
                    })
当我点击元素时,我可以看到电子邮件字符串值,但是密码总是空的


要获取密码值,我需要做哪些不同的操作?

确保您已在iPhone键盘上按了回车键,如果没有,则不会保存该值。

确保您已在iPhone键盘上按了回车键,如果没有,则不会保存该值!我感到发抖。如果你将你的评论改为答案,我可以将其标记为正确答案。谢谢您可以调用password.FetchValue();也