Windows 10 UWP app menu flyout inside menu item

shady

Is it possible to have a menu flyout inside a menu flyout item?

        <AppBarButton x:Name="Button" Icon="Add" Label="Create List">
            <AppBarButton.Flyout>
                <MenuFlyout>
                    <MenuFlyoutItem Text="b1">
                        <FlyoutBase.AttachedFlyout>
                            <MenuFlyout x:Name="ItemsMenu" Placement="Left">
                                <MenuFlyoutItem Text="test1"/>
                                <MenuFlyoutItem Text="test2"/>
                            </MenuFlyout>
                        </FlyoutBase.AttachedFlyout>
                    </MenuFlyoutItem>
                    <MenuFlyoutItem Text="b2" />
                    <MenuFlyoutItem Text="b3" />
                    <MenuFlyoutItem Text="b4" />
                    <MenuFlyoutItem Text="b5" />
                </MenuFlyout>
            </AppBarButton.Flyout>
        </AppBarButton>

Clicking on the item just makes the menu disappear. I tried calling ItemsMenu.ShowAt() on mouse pointer enter but it just makes the menu disappear when I hover over it. Any one have any ideas?

John Zhang

I have tried your code but can't make it work , so I figure out a roundabout method to solve it, I hope this will provide some inspirations for you:

<Page.Resources>
    <CollectionViewSource x:Key="cvs" x:Name="cvs" IsSourceGrouped="True"/>
    <Flyout x:Key="DeclarativeAttachedFlyout">
        <StackPanel>
            <Button Content="b1">
                <Button.Flyout>
                    <MenuFlyout>
                        <MenuFlyoutItem Text="t1"></MenuFlyoutItem>
                        <MenuFlyoutItem Text="t2"></MenuFlyoutItem>
                        <MenuFlyoutItem Text="t3"></MenuFlyoutItem>
                        <MenuFlyoutItem Text="t4"></MenuFlyoutItem>
                    </MenuFlyout>
                </Button.Flyout>
            </Button>
            <Button Content="b2"></Button>
            <Button Content="b3"></Button>
            <Button Content="b4"></Button>
            <Button Content="b5"></Button>
        </StackPanel>
    </Flyout>

 <MenuFlyout x:Key="DeclarativeAttachedFlyout2">
        <MenuFlyoutItem Text="b1" ></MenuFlyoutItem>
        <MenuFlyoutItem Text="b2" ></MenuFlyoutItem>
        <MenuFlyoutItem Text="b3" ></MenuFlyoutItem>
        <MenuFlyoutItem Text="b4" ></MenuFlyoutItem>
        <MenuFlyoutItem Text="b5" ></MenuFlyoutItem>
        <MenuFlyoutSubItem Text="s1">
            <MenuFlyoutItem Text="b6"></MenuFlyoutItem>
        </MenuFlyoutSubItem>
    </MenuFlyout>
</Page.Resources>
<AppBarButton x:Name="button" Icon="Add" Label="Create List" Flyout="{StaticResource DeclarativeAttachedFlyout}"> </AppBarButton>
<AppBarButton x:Name="button" Icon="Add" Label="Create List" Flyout="{StaticResource DeclarativeAttachedFlyout2}"> </AppBarButton>

Here is a detailed explain about flyout , you may click this

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Windows 10 UWP app menu flyout inside menu item

From Dev

How to add context menu in Windows 10 UWP on ListView Item?

From Dev

How to choose flyout menu item in c# metro style app

From Dev

Windows Phone 8.1 - Menu flyout item click command c#

From Dev

List all fonts and colors in menu flyout in windows store 8.1 app

From Dev

Flyout Menu windows phone 8.1 on hold Listview

From Dev

Renaming a start menu Item in Windows 10

From Dev

How can I remove the default "Paste" context menu entry of a TextBox control in a Windows 10 UWP app?

From Dev

UWP ListView Item context menu

From Dev

Set Menu Flyout background color using c# in windows 8

From Dev

How to open a flyout from right side of screen in Windows 10 UWP?

From Dev

Windows 10 mobile (UWP) Flyout with calendar picker locking on screen

From Dev

Windows 10: Pin an item to left side of Start Menu?

From Dev

How to implement the Windows 10 OneNote Menu in Universal Windows Platform app

From Dev

Flyout navigation controller menu indicator

From Dev

App wide accessible Flyout in UWP

From Dev

Windows 10 Universal app flyout, how to remove scrollbars?

From Dev

windows 10 start menu not launching

From Dev

Rebuild Windows 10 Start Menu

From Dev

Change windows 10 start menu

From Dev

Windows 10 context menu modification

From Dev

Windows 10 start menu CTD

From Dev

Customize Windows 10 Start Menu

From Java

Flexbox dropdown menu inside of a Grid item navbar

From Dev

Menu / sidebar with interactive buttons inside item

From Dev

How to create drop down menu foreach row in gridview onclick (UWP windows 10 application)

From Dev

Close UWP flyout with listview item click

From Dev

Menu inside menu in Matlab

From Dev

How to change open animation of flyout menu

Related Related

  1. 1

    Windows 10 UWP app menu flyout inside menu item

  2. 2

    How to add context menu in Windows 10 UWP on ListView Item?

  3. 3

    How to choose flyout menu item in c# metro style app

  4. 4

    Windows Phone 8.1 - Menu flyout item click command c#

  5. 5

    List all fonts and colors in menu flyout in windows store 8.1 app

  6. 6

    Flyout Menu windows phone 8.1 on hold Listview

  7. 7

    Renaming a start menu Item in Windows 10

  8. 8

    How can I remove the default "Paste" context menu entry of a TextBox control in a Windows 10 UWP app?

  9. 9

    UWP ListView Item context menu

  10. 10

    Set Menu Flyout background color using c# in windows 8

  11. 11

    How to open a flyout from right side of screen in Windows 10 UWP?

  12. 12

    Windows 10 mobile (UWP) Flyout with calendar picker locking on screen

  13. 13

    Windows 10: Pin an item to left side of Start Menu?

  14. 14

    How to implement the Windows 10 OneNote Menu in Universal Windows Platform app

  15. 15

    Flyout navigation controller menu indicator

  16. 16

    App wide accessible Flyout in UWP

  17. 17

    Windows 10 Universal app flyout, how to remove scrollbars?

  18. 18

    windows 10 start menu not launching

  19. 19

    Rebuild Windows 10 Start Menu

  20. 20

    Change windows 10 start menu

  21. 21

    Windows 10 context menu modification

  22. 22

    Windows 10 start menu CTD

  23. 23

    Customize Windows 10 Start Menu

  24. 24

    Flexbox dropdown menu inside of a Grid item navbar

  25. 25

    Menu / sidebar with interactive buttons inside item

  26. 26

    How to create drop down menu foreach row in gridview onclick (UWP windows 10 application)

  27. 27

    Close UWP flyout with listview item click

  28. 28

    Menu inside menu in Matlab

  29. 29

    How to change open animation of flyout menu

HotTag

Archive