void CreateNewItem() { View dialogView = LayoutInflater.Inflate(Resource.Layout.ItemCreate, null); // Retrieve the components EditText name = dialogView.FindViewById <EditText>(Resource.Id.editText1); DatePicker datePicker = dialogView.FindViewById <DatePicker>(Resource.Id.datePicker1); TimePicker timePicker = dialogView.FindViewById <TimePicker>(Resource.Id.timePicker1); // Build the dialog Android.Support.V7.App.AlertDialog.Builder builder = new Android.Support.V7.App.AlertDialog.Builder(this); builder.SetPositiveButton("Create", (sender, e) => CommitCreation(name.Text, datePicker, timePicker)); builder.SetNegativeButton("Cancel", (sender, e) => { }); Android.Support.V7.App.AlertDialog dialog = builder.Create(); dialog.SetView(dialogView); dialog.Show(); }