private void OnCustomEdit(object sender, EventArgs e, object v) { Xamarin.Forms.Button button = (Xamarin.Forms.Button)sender; int id = Convert.ToInt32(button.CommandParameter); SavedRollsView test = (SavedRollsView)v; test.EditRoll(id); }