I am using the following code to create a simple login page.
The problem I am having is that the "Login" button is displaying at the bottom of the page, and not directly below the TableView.
Any help or guidance is greatly appreciated.
Thanks!!!
Code........
`
namespace TDMS
{
public class Login : ContentPage
{
public Login ()
{
Label lblBlank = new Label {
Text = " ",
};
Image img = new Image {
Source = ImageSource.FromFile ("Logo.png"),
};
TableView tv = new TableView {
Intent = TableIntent.Form,
BackgroundColor = Color.FromRgb (237, 131, 34),
//SeparatorStyle = UITableViewCellSeparatorStyle.None,
Root = new TableRoot ("User Login") {
new TableSection ("") {
new EntryCell {
Label = "User Name:",
Placeholder = "Enter User Name",
Keyboard = Keyboard.Default
},
new EntryCell {
Label = "Password:",
Placeholder = "Enter Password",
Keyboard = Keyboard.Default
},
}
}
};
Button btn = new Button {
Text = "Login",
Font = Font.SystemFontOfSize(12, FontAttributes.Bold)
};
this.BackgroundColor = Color.FromRgb (237, 131, 34);
Content = new StackLayout {
Children = {
lblBlank,
lblBlank,
img,
tv,
btn
}
};
}
}
}
`