C# 在通用应用程序中最小化底部AppBar的高度
我想最小化底部AppBar的高度这是我的xaml代码:C# 在通用应用程序中最小化底部AppBar的高度,c#,win-universal-app,windows-10-universal,C#,Win Universal App,Windows 10 Universal,我想最小化底部AppBar的高度这是我的xaml代码: <Page.BottomAppBar > <CommandBar Background="#393185" Foreground="White" VerticalAlignment="Stretch" Style="{Binding Source={StaticResource Ellipsis}}" Height="40" MaxHeight="40" > <C
<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>
但我得到的结果是:
因此,我得到了您可以在图像中看到的空间(在底部AppBar的顶部)
在这种样式中,我应该更改哪个参数以最小化底部AppBar的高度,而不会导致出现空白
感谢您的帮助如果最小高度较小(默认值为60),则可以设置属性,以便删除空白
<x:Double x:Key="AppBarExpandButtonThemeHeight">48</x:Double>
<x:Double x:Key="AppBarThemeMinHeight">48</x:Double>
48
48
似乎您需要修改模板。我该怎么做,先生,您能给我解释一下吗?看一下ok谢谢先生的链接:)