Skip to content

ShouldShowToolbarButton() override on FlyoutPage not working #15111

@GODston

Description

@GODston

Description

Im trying to have a custom navigation bar.
I have a FlyoutPage that sets a custom Detail (a NavigationPage that contains a TabbedPage). In the tabbed page constructor i load a custom view to my navigationPage title view, wich works correctly, but since im using a FlyoutPage the burger 'Open Flyout' button is still present.
After looking around i found that i could override the ShouldShowToolbarButton() in my FlyoutPage to make it always return false, thus making it not show the button, but this does not work. Im doing my testing on Android.

Steps to Reproduce

1- Create new .net MAUI app.
2- Create new FlyoutPage
3- Load a custom ContentPage as Flyout in the constructor (example 1)
4- Load a custom TabbedPage inside a NavigationPage as Detail (emaple 1)

<--- Example 1 --->
public Flyout()
{
InitializeComponent();

Flyout = new MainPage();
Detail = new NavigationPage( new TabbedP() );
}

5- Load a custom View as TitleView in the TabbedPage
NavigationPage.SetTitleView(this, new NewContent2());
6- Override the ShouldShowToolbarButton method in the FlyoutPage so it always returns false.

public override bool ShouldShowToolbarButton()
{
    return false;
}

Link to public reproduction project repository

https://github.com/GODston/Public

Version with bug

8.0 previews

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android 13 API 33

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions