Is it possible to create buttons on the view using only 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, tru开发者_C百科e);
I know it's possible with Reflection API using OnTapAttribute
, but I wonder how to do that with Elements API.
And when user taps on the button it should Push another view controller...
Oh I guess I can use StyledStringElement
like that
new StyledStringElement ("Login", delegate{ DoLogin (); })
精彩评论