Search This Blog

Tuesday, 8 February 2022

How To Define Xamarin Form Command Using Lambda Expression

Creating Command Without Command Parameter

public ICommand SignInCommand => new Command(async () =>
{
  // write logic to perform
});

Creating Command With Command Parameter

public ICommand SignInCommand => new Command<object>(async (item) =>
{
    if (item != null)
    {
      // write logic to perform
    }
});


No comments:

Post a Comment

Popular Posts