Hi HeinzDeubler-1084,
Welcome to our Microsoft Q&A platform!
You only need to define the corresponding properties in the ViewModel.
StartPage.xaml
<StackLayout Margin="20">
<Entry Placeholder="First Name" Text="{Binding FirstName}"></Entry>
<Entry Placeholder="Last Name" Text="{Binding LastName}"></Entry>
<Entry Placeholder="EmailAddress" Text="{Binding EmailAddress}"></Entry>
<Button Text="Save"
Command="{Binding saveCommand}"></Button>
</StackLayout>
StartPageViewModel.cs
public class StartPageViewModel
{
public string FirstName { get; set; }
public string LastName { get; set; }
public string EmailAddress { get; set; }
List<IPeople> person = new List<IPeople>();
public ICommand saveCommand { get; set; }
public StartPageViewModel()
{
saveCommand = new Command(Save);
}
private void Save()
{
person.Add(new People
{
FirstName = FirstName,
LastName = LastName,
EmailAddress = EmailAddress
});
}
}
Regards,
Kyle
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.