Welcome to Xamarin Guy Show Blog

Keep updated for latest and Greatest Posts from Xamarin guy

Xamarin Forms Button Clicked Event [Tutorial 40]

The Button is the most fundamental interactive control in all of Xamarin.Forms. The Button usually displays a short text string indicating a command, but it can also display a bitmap image, or a combination of text and an image. The user presses the Button with a finger or clicks it with a mouse to initiate that command.
In this tutorial we are going to implement xamarin forms button click events for Xaml and c#.
In Xaml we are going to add a clicked events handler for the button and which is going to be handled inside the code behind.
Enough is Enough Show me the code 😀
Step1:
Page1.xaml

In Pure Code behind  we will be adding a button to the stack layout so that it is visible inside the UI screen.And we are going to handle the button clicked using button.Clicked += ButtoncbClicked; events that’s all. in Page1.cs 😀
. After a button is clicked we are going to  navigating to next page using await Navigation.PushAsync(new Page2()); command.

Download Working Project From Here : http://xamaringuyshow.com/buttonclickedtut40/

Leave a Reply

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.