Xamarin.Android Dialogs Alert dialog

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

Creating an alert dialog

AlertDialog.Builder builder = new AlertDialog.Builder(Context);
builder.SetIcon(Resource.Drawable.Icon);
builder.SetTitle(title);
builder.SetMessage(message);

builder.SetNeutralButton("Neutral", (evt, args) => { 
    // code here for handling the Neutral tap
});

builder.SetPositiveButton("Ok", (evt, args) => { 
    // code here for handling the OK tap
});

builder.SetNegativeButton("Cancel", (evt, args) => { 
    // code here for handling the Cancel tap
});

builder.SetCancelable(false);
builder.Show();


Got any Xamarin.Android Question?