Share via

How to achieve Partial Flyout Menu - MAUI Windows

Vaibhav Methuku 205 Reputation points
2024-01-08T06:47:06.4733333+00:00

I had created a flyout in Windows - Maui

Facing the below issues while implementing the Flyout:

  1. Unable to change the Hamburger menu icon, Default icon is populating.
  2. Trying to achieve the Flyout Collapsable style as Partial, I had tried below ways but no working.

1

public FlyoutPage()
{
	InitializeComponent();
	NavigationPage.SetHasNavigationBar(this, false);
	this.On<Microsoft.Maui.Controls.PlatformConfiguration.Windows>().SetCollapseStyle(CollapseStyle.Partial);
	this.On<Microsoft.Maui.Controls.PlatformConfiguration.Windows>().UsePartialCollapse();
	Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific.FlyoutPage.SetCollapseStyle(flyout, CollapseStyle.Partial);
	Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific.FlyoutPage.SetCollapsedPaneWidth(flyout, 20);
	Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific.FlyoutPage.CollapsedPaneWidth();
}
Developer technologies | .NET | .NET MAUI
{count} votes

1 answer

Sort by: Most helpful
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 50,166 Reputation points Microsoft External Staff
    2024-01-10T06:56:54.8433333+00:00

    Hello,

    Unable to change the Hamburger menu icon, Default icon is populating.

    Currently, MAUI provides an API for modifying FlyoutIcon in the Shell. There is currently no API for modifying the hamburger icon in FlyoutPage

    <Shell
       ...
        Shell.FlyoutBehavior="Flyout"
        FlyoutIcon="dotnet_bot.png">
    

    For this requirement, you can publish it to the official GitHub repository to make our development team aware of it.

    Trying to achieve the Flyout Collapsable style as Partial, I had tried below ways but no working.

    This API has not yet been migrated, see Platform Specifics are not working #5856 for details.

    FlyoutPage CollapseStyle and CollapsedPaneWidth. While in Xamarin.Forms we used a custom control called FlyoutPageControl where we included properties to manage this Platform Specifics, in .NET MAUI we use RootNavigationView https://docs.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.controls.navigationview?view=winui-3.0 without this options without customize the control.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.