dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.19k stars 1.75k forks source link

[Feature Request] New Navigation Bar to Mimic win ui Behavour In Shell #7345

Open davidbuckleyni opened 2 years ago

davidbuckleyni commented 2 years ago

Description

Win Ui navigation as per the win ui gallery app sample shows a left-hand navigation menu that allows child items, it shows that there are child items underneath by allowing a graphic to represent open and close.

image

As you can see the navigation menu item has a root node and the ability for child nodes. The child nodes should allow the ability to have an icon and text and then the link itself which would be another page.

Also the controls should allow animations of opening and closing a section as per WIn UI Gallery sample app found at this repo

https://github.com/microsoft/WinUI-Gallery

It could well be this should be a control separate to shell

Public API Changes

I suggest that we should have a tag under the shell content called subitem or child item

<NavigationBar x:Name="navBar1" DocPosition="Left,Right">
    <ShellContent
        Title="Home"
        ContentTemplate="{DataTemplate local:MainPage}"
        Route="MainPage" />
    <FlyoutItem Title="Basic Input">
        <ShellContent
            Title="Basic Input"
            ContentTemplate="{DataTemplate local:SalesOrderPage}"
            Route="BasicInput" >
           <ChildItem x:Name="mnuInputVal" Text="Input Validations" Icon="" IconPosition="" />
           <ChildItem x:Name="mnubutton" Text="Button" Icon="" IconPosition="" />
            <ChildItem x:Name="mnuDropDownButton" Text="DropDownButton" Icon="" 
             IconPosition="" />    
         </ShellContent>
    </FlyoutItem>
</NavigationBar>

Intended Use-Case

I believe that if Win ui is to be fully supported route then we need to have child items to behave in the same manor as win ui desktop currently does. I only believe this should be one level deep and for us not to get into the same mess of web menus and allow unlimited levels of menus.

ghost commented 2 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

PureWeen commented 2 years ago

The ShellHandler's platformview is a NavigationView so if you want to set that menu you can for now.

jingliancui commented 11 months ago

Hope this feature can be implemented, it is important on pc with win and maccatalyst

eduardoagr commented 6 months ago

I was able to implement something like this