How to give unique id for each button

一世执手 提交于 2020-04-28 21:50:23

问题


I have buttons created by loop and each button it corresponds to a desk, so i have to able when i click a button i have to design spesific row of database

how i add buttons:

for (int i = 1; i < terasmasasayisi; i++)
    {
        var buttonteras = new Button
        {
            Text = i.ToString(),
            HeightRequest = 45,
            WidthRequest = 45,
            Margin = 5,
            BorderRadius = 100,
        };``

        teras.Children.Add(button);
    }

If i can set a relationship between the table number and i(desknumber), I can do this according to the id from my database.

im so confused

来源:https://stackoverflow.com/questions/60465994/how-to-give-unique-id-for-each-button

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!