SideBar Nav Menu

Ronald Rex 1,671 Reputation points
2023-02-01T21:41:39.3+00:00

Left Nav Bar

Hello Friends. Has anyone ever used a side nav bar menu (kind of like a bootstrap Menu) in their .Net Maui windows app? Thanks !!!

Developer technologies | .NET | .NET MAUI
{count} votes

Answer accepted by question author
  1. Anonymous
    2023-02-03T02:29:48.4266667+00:00

    Hello,

    Thanks for you update.

    You can do this by using .NET MAUI Shell flyout

    AS Note: please set the Shell.FlyoutBehavior="Locked", you can refer to the following code.

    <Shell    
        x:Class="MauiApp4.AppShell"
        xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
        xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
        xmlns:local="clr-namespace:MauiApp4"
        Shell.FlyoutBehavior="Locked">
        <FlyoutItem Title="Cats">
            <Tab>
                <ShellContent ContentTemplate="{DataTemplate local:MainPage}" />
            </Tab>
        </FlyoutItem>
        <FlyoutItem Title="Dogs">
            <Tab>
                <ShellContent ContentTemplate="{DataTemplate local:NewPage1}" />
            </Tab>
        </FlyoutItem></Shell>
    
    

    Best Regards,

    Leon Lu


    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 additional answers

Sort by: Most helpful

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.