void btnPost_Click(object sender, EventArgs e) { CreatePostDialog dialog = new CreatePostDialog(); FragmentTransaction transaction = FragmentManager.BeginTransaction(); //Subscribe to event dialog.OnCreatePost += dialog_OnCreatePost; dialog.Show(transaction, "create post"); }
public override bool OnOptionsItemSelected(IMenuItem item) { switch (item.ItemId) { case Resource.Id.PostBtn: CreatePostDialog dialog = new CreatePostDialog(); FragmentTransaction transaction = FragmentManager.BeginTransaction(); //Subscribe to event dialog.OnCreatePost += dialog_OnCreatePost; dialog.Show(transaction, "create post"); return(true); default: return(base.OnOptionsItemSelected(item)); } }