【问题标题】:Show flyouts from hamburger button显示来自汉堡按钮的弹出按钮
【发布时间】:2017-11-16 19:27:27
【问题描述】:

我想显示一个汉堡包按钮的弹出按钮...就像它发生在 Windows 10 注销时一样(见图)。

有可能吗?!?


杰西卡感谢您的回复,但在我的代码中我可以将您的放在哪里!?!

<Controls:HamburgerButtonInfo x:Name="LogoutButton" PageParameter="0" ButtonType="Command" Tapped="LogoutButton_Tapped">  
    <Controls:HamburgerButtonInfo.NavigationTransitionInfo>  
        <SuppressNavigationTransitionInfo />  
    </Controls:HamburgerButtonInfo.NavigationTransitionInfo>  
    <StackPanel Orientation="Horizontal">  
        <ToolTipService.ToolTip>  
            <TextBlock Text="Logout" x:Uid="logout_ToolTipService" TextWrapping="Wrap" />  
        </ToolTipService.ToolTip>  
        <SymbolIcon Width="48" Height="48" Symbol="Contact" />  
        <TextBlock Margin="12,0,0,0" Name="textBlock_LogoutButton"  x:Uid="textBlock_LogoutButton" VerticalAlignment="Center" Text="Logout" />  
    </StackPanel>  
</Controls:HamburgerButtonInfo>

【问题讨论】:

  • 您可以将MenuFlyout 放在任何按钮上,更不用说汉堡按钮了。
  • 对不起,我不明白你的意思!!!
  • ...为什么要投反对票?

标签: windows uwp-xaml hamburger-menu flyout


【解决方案1】:
<Button>  
    <FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xE700;" />  
    <Button.Flyout>  
        <MenuFlyout>  
            <MenuFlyoutItem Text="Some text"/>  
            <ToggleMenuFlyoutItem Text="Some text 2"/>  
            <ToggleMenuFlyoutItem Text="Some text 3"/>  
        </MenuFlyout>  
    </Button.Flyout>  
</Button>

【讨论】:

    猜你喜欢
    • 2021-01-24
    • 2018-10-12
    • 1970-01-01
    • 2018-01-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多