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
Create a custom button
public class MyIDButton : Button
{
public static readonly BindableProperty ButtonIDProperty = BindableProperty.Create(nameof(ButtonId), typeof(int), typeof(MyIDButton), 999);
public int ButtonId
{
get => (int)GetValue(ButtonIDProperty);
set => SetValue(ButtonIDProperty, value);
}
}
Then use it like
var buttonteras = new MyIDButton
{
Text = i.ToString(),
HeightRequest = 45,
WidthRequest = 45,
Margin = 5,
ButtonId = 1, //whatever your value
BorderRadius = 100,
};