在 UWP (Windows 10) 中隐藏 CommandBar 中的省略号按钮(更多按钮)

tha*_*ile 5 ellipsis commandbar uwp

我在我的项目 (UWP) 中使用命令栏,但是,我意识到默认情况下命令栏中有一个省略号按钮。有什么办法可以隐藏/删除它吗?

省略号按钮

这是我的代码:

<Page.BottomAppBar>
    <CommandBar 
        Background="{StaticResource CitiKioskBackgroundBrush}"
        IsOpen="True"
        IsSticky="True"
        Name="appBarName"
        Visibility="Collapsed"
        >
        <CommandBar.PrimaryCommands>
            <AppBarButton Name="SettingAppBarButton"
                      Icon="Setting"
                      Label="Settings" 
                      Foreground="White" Click="SettingAppBarButton_Click"/>
        </CommandBar.PrimaryCommands>
    </CommandBar>
</Page.BottomAppBar>
Run Code Online (Sandbox Code Playgroud)

小智 10

您可以使用该OverflowButtonVisibility属性:

<CommandBar OverflowButtonVisibility="Collapsed"></CommandBar>

  • @thalassophile 该属性是从“Windows 10 周年版(引入 v10.0.14393.0)”引入的。请确保您的项目的最低版本为 14393,目标版本为 14393 或更高版本。 (2认同)