Home > Mobile >  Xamarin. Forms dynamically add entry how to obtain its value?
Xamarin. Forms dynamically add entry how to obtain its value?

Time:11-21

Private void btnAdd_Clicked (object sender, EventArgs e)
{
{Placeholder Entry entry1=new Entry ()="please enter the code 1}";
//entry1. Name no Name attribute can be set up, the Id attribute is read-only
{Placeholder Entry entry2=new Entry ()="please enter the code 2"};

Enclosing myLayOut. Children. The Add (entry1);
Enclosing myLayOut. Children. The Add (entry2);

//add controls whether it has been in existence before?
//this. MyLayOut. FindByName method to control has a Name, but I don't know how to set up dynamic add Entry Name!!
}

Private void btnSave_Clicked (object sender, EventArgs e)
{
//here how the above two Entry value of the input box?
}
  • Related