Пользователь может создать столько кнопок, сколько пожелает, что отображается в ScrollView.
После того, как он нажмет кнопку, мне нужно небольшое всплывающее окно, где он может ввести имя кнопки.
Код: Выделить всё
void Mainpage_button_addNewButton_Clicked(object sender, EventArgs e)
{
var entry = new Namenseingabe();
Button button = new Button
{
//Text = entry.Name, Here i try to get the Value from the Entry
AutomationId = id.ToString(),
};
MainPageButtonStackLayout.Children.Add(button);
mainPageButtons.Add(button);
}
Код: Выделить всё
Код: Выделить всё
private void EntryValue_Completed(object sender, EventArgs e)
{
var a = ((Entry)sender).Text;
}
Подробнее здесь: https://stackoverflow.com/questions/583 ... ith-a-name
Мобильная версия