iLe*_*ing 2 c# xamarin.ios monotouch.dialog
是否可以仅使用Elements API在视图上创建按钮?
var root =
new RootElement ("LoginScreen"){
new Section ("Enter your credentials") {
new EntryElement ("Username", "Your user name", "user1"),
new EntryElement ("Password", "Your password", "", isPassword:true),
},
new Section () {
new RootElement ("Login"){
//Here should be a button
}
},
new Section () {
new BooleanElement ("Save your credentials", false),
},
};
var dv = new MainController (root, true){ Autorotate = true };
navigation.PushViewController (dv, true);
Run Code Online (Sandbox Code Playgroud)
我知道使用Reflection API可以实现OnTapAttribute,但我想知道如何使用Elements API.
当用户点击按钮时,它应推送另一个视图控制器...
哦,我想我可以用StyledStringElement这样的
new StyledStringElement ("Login", delegate{ DoLogin (); })
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2012 次 |
| 最近记录: |