public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.Inflate(Resource.Layout.MainActivityFragment, null); var x = view.FindViewById <FrameLayout>(Resource.Id.frameLayout1); var fr = FragmentManager.BeginTransaction(); fr.Add(Resource.Id.frameLayout1, _childFragment); fr.Commit(); FragmentTransaction transaction = GetSupportFragmentManager().beginTransaction(); // Replace whatever is in the fragment_container view with this fragment, // and add the transaction to the back stack transaction.replace(R.id.fragment_container, newFragment); transaction.addToBackStack(null); // Commit the transaction transaction.commit(); return(x); }