Windows Phone 8.1 AppBar占用空间

Windows Phone 8.1 AppBar Taking Up Unnecessary Room

我的应用程序中有一个 AppBar,它只包含一个辅助命令。

<Page.BottomAppBar>
    <CommandBar>
        <CommandBar.SecondaryCommands>
            <AppBarButton Label="refresh" Click="Refresh_WebView"/>
        </CommandBar.SecondaryCommands>
    </CommandBar>
</Page.BottomAppBar>

但是,它仍然有足够的 AppBar "visible"(您无需将其拉起即可看到),以便为不存在的 PrimaryCommand 留出空间。这浪费了很多space。商店在下载部分做同样的事情,但 AppBar 不会占用不必要的 space。我怎样才能指定我也不希望我的呢?

这应该可以解决问题。

<Page.BottomAppBar>
    <CommandBar ClosedDisplayMode="Minimal">
        <CommandBar.SecondaryCommands>
            <AppBarButton Label="refresh" Click="Refresh_WebView"/>
        </CommandBar.SecondaryCommands>
    </CommandBar>
</Page.BottomAppBar>

在弄清楚你想要什么后编辑了答案!这应该有效。