Skip to content

Can not Customise Navigation Pages #20

@Bumbar14

Description

@Bumbar14

Hi,

I am a newbie, but I followed the official documentation for FreshMvvm on how to Customise Navigation Pages. It looks like the override function for CreateContainerPage does not work.

Here is my code

Customized navigation container
internal class CustomNavigationPage : FreshMvvm.Maui.FreshNavigationContainer
{

    public CustomNavigationPage(Page page) : base(page) 
    {
     
    }

    protected override Page CreateContainerPage(Page page)
    {
        var container = new NavigationPage(page);
        container.BarBackgroundColor = Color.FromArgb("#FF0000");

        return container;
    }
}

And app.xaml.cs

public App()
{
    InitializeComponent();
    
    var mainPage = FreshPageModelResolver.ResolvePageModel<TestPage1PageModel>();
    // var mainContainer = new FreshNavigationContainer(mainPage);
    var mainContainer = new CustomNavigationPage(mainPage);

    MainPage = mainContainer;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions