警報對話方塊
建立警報對話方塊
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();