@CastielTR said:
When I want to open the new page, the toolbar disappears and cannot be returned.
Make Activity1
inherit from AppCompatActivity
.
Enable the back button on Toolbar .
Override the back button event .
[Activity(Label = "Activity1")] public class Activity1 : AppCompatActivity { protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Create your application here View v = this.LayoutInflater.Inflate(Resource.Layout.MyLayout, null); SetContentView(v); SupportActionBar.SetDisplayHomeAsUpEnabled(true); //show the back button } public override bool OnOptionsItemSelected(IMenuItem item) { if (item.ItemId == Android.Resource.Id.Home) { Finish(); } return true; } }
Answers
Create a new Activity named
MyActivity.cs
.Reference the layout to the new Activity in
OnCreate
method .Xamarin forums are migrating to a new home on Microsoft Q&A!
We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A!
For more information, please refer to this sticky post.
There seems to be some trouble.
When I want to open the new page, the toolbar disappears and cannot be returned.

Make
Activity1
inherit fromAppCompatActivity
.Enable the back button on Toolbar .
Override the back button event .
Sample code