Answers for "Xamarin Forms Update Button Text Code"

C#
0

Xamarin Forms Update Button Text Code

private async void Btn1_Clicked(object sender, EventArgs e)
{
   var btn = (Button)sender;
   btn.Text = "Wait";

   ...some code...maybe async or not (take out async above if not)

   Device.BeginInvokeOnMainThread(() =>
   {
        btn.Text = "Do Something";
   });
}
Posted by: Guest on February-15-2022

Code answers related to "Xamarin Forms Update Button Text Code"

C# Answers by Framework

Browse Popular Code Answers by Language