尽量减少在一个通用的应用程序的BottomAppBar的高度 [英] minimize the Height of the BottomAppBar in a universal App

查看:661
本文介绍了尽量减少在一个通用的应用程序的BottomAppBar的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要尽量减少BottomAppBar的高度,这是我的XAML代码:

I want to minimize the Height of the BottomAppBar this is my xaml code:

<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风格是命令栏的链接
,但我得到的是这样的结果:

我得到的结果,你可以在图片中看到的空间(以在BottomAppbar顶部)

I get as a result the space that you can see in the image(in the top of the BottomAppbar)

该参数应我这种风格的改变,以尽量减少bottomAppBar的内部消除白色的空间,我得到的结果。

which parameter should I change in this Style to minimise the Height of bottomAppBar whithout the white space that I get as a result

感谢您的帮助。

推荐答案

您可以设置的属性,如果了minHeight更小(默认。60),这样的空白将被删除

You can set the properties if the MinHeight to be smaller (default is 60) so the white space is removed.

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

这篇关于尽量减少在一个通用的应用程序的BottomAppBar的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆