[FIXED] Obtain current page name in Xamarin Forms app

Issue

I am currently trying to understand how to get the name of the (xaml) page I am currently into, with my Xamarin Form app.

How am I supposed to do it? I tried a variety of cases, even looking around the Internet, but nothing actually worked for me so far :/

Solution

This is just C# reflection – the name of the XAML page should match the name of it’s class

var name = this.GetType ().Name;

Answered By – Jason

Answer Checked By – Mildred Charles (Easybugfix Admin)

Leave a Reply

(*) Required, Your email will not be published