1
我想盡量減少BottomAppBar的高度,這是我的XAML代碼:減少BottomAppBar的高度在一個通用的應用程序
<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」風格是命令欄link 的默認風格,但我所得到的是這樣的結果:
我得到的結果是,你可以在圖片中看到的空間(在BottomAppbar的頂部)
其參數應我在此風格的改變,以儘量減少bottomAppBar的內部消除白色空間的高度,我得到的結果
感謝您的幫助
看起來像你需要修改模板。 –
我該怎麼做,爵士,你能解釋一下嗎? – user3821206
看看[控件模板](https://msdn.microsoft.com/en-us/library/windows/apps/mt210948.aspx) –