最小化通用应用程序中 BottomAppBar 的高度

minimize the Height of the BottomAppBar in a universal App

我想最小化 BottomAppBar 的高度这是我的 xaml 代码:

<Page.BottomAppBar >
    <CommandBar Background="#393185"
            Foreground="White" VerticalAlignment="Stretch" Style="{Binding Source={StaticResource Ellipsis}}" Height="40" MaxHeight="40" >
        <CommandBar.CommandBarOverflowPresenterStyle>
            <Style TargetType="CommandBarOverflowPresenter">
                <Setter Property="Background"
                    Value="#00a0e3" ></Setter>
                <Setter Property="Margin" Value="0"></Setter>
                <Setter Property="Padding" Value="0"></Setter>
                <Setter Property="BorderBrush" Value="Transparent"/>

            </Style>
        </CommandBar.CommandBarOverflowPresenterStyle>
        <CommandBar.PrimaryCommands>



            <AppBarButton Label="Cortana"
                      Icon="Microphone"
                      Foreground="White" />

        </CommandBar.PrimaryCommands>
        <CommandBar.SecondaryCommands >
            <AppBarButton Label="Info"
                      Foreground="White" Background="#00a0e3"/>
        </CommandBar.SecondaryCommands>
    </CommandBar>
</Page.BottomAppBar>

"Ellepsis"样式是commandBar的默认样式link 但我得到的是这个结果:

我得到的结果是 space,您可以在图像中看到(在 BottomAppbar 的顶部)

我应该更改此样式中的哪个参数以最小化 bottomAppBar 的高度而没有我得到的白色 space

感谢帮助

如果 MinHeight 较小(默认为 60),您可以设置属性,以便删除白色 space。

<x:Double x:Key="AppBarExpandButtonThemeHeight">48</x:Double>
<x:Double x:Key="AppBarThemeMinHeight">48</x:Double>