Alan2
Alan2

Reputation: 24572

Can I use a ContentPage in the constructor for new NavigationPage?

My application looks like this (subject to change)

var settingsPage = new NavigationPage(new SettingsPage())
{
   Title = "Settings",
   Icon = "ionicons_2_0_1_settings_25.png"
};

namespace Japanese
{
    public partial class SettingsPage : ContentPage
    {

The application works but I am wondering did I make a mistake by having this inherit from a ContentPage even though it works.

Would there be any reason for me to change this to inherit from a Navigation Page? Does a navigation page offer some different methods I might be able to take advantage of later?

Upvotes: 0

Views: 74

Answers (1)

Jason
Jason

Reputation: 89102

This is a fairly standard way to do it. There's nothing wrong with it.

Upvotes: 1

Related Questions