xamarin.forms汉堡图标

时间:2019-03-19 15:43:04

标签: xaml xamarin.forms hamburger-menu

我对母版页和汉堡包按钮有问题,当隐藏菜单时,按钮的高度未达到高度(第一张图片),否则为(第二张图片)。我真的不明白 有人可以帮助我吗?

menu closed

menu expaned

非常感谢。

此处显示的页面

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:DMInfoOrganizer"
             x:Class="DMInfoOrganizer.MasterPage">
        <StackLayout>
        <ListView x:Name="lstMenu" x:FieldModifier="public">
                <ListView.ItemsSource>
                    <x:Array Type="{x:Type local:MasterPageItem}">
                    <local:MasterPageItem Title="{local:Translate TxtHome}" TargetType="{x:Type local:Home}" />
                    <local:MasterPageItem Title="{local:Translate TxtNuovaLibreria}" TargetType="{x:Type local:NuovaLibreria}" />
                    <local:MasterPageItem Title="{local:Translate TxtImpostazioni}" TargetType="{x:Type local:Impostazioni}" />
                </x:Array>
                </ListView.ItemsSource>
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <ViewCell>
                            <Grid Padding="5,10">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="30"/>
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Image Source="{Binding IconSource}" />
                                <Label Grid.Column="1" Text="{Binding Title}" />
                            </Grid>
                        </ViewCell>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
        </StackLayout>
</ContentPage>

此处为母版

{{1}}

2 个答案:

答案 0 :(得分:0)

据我所知,Microsoft在1809年更改了工具栏项目的高度,您的应用似乎处理得不好。因此,您不应该使用1809版的SDK来编译该应用程序(但要使用某些旧版本),一切都会好起来的。

答案 1 :(得分:0)

非常感谢!

问题是由于出现此错误,我无法使用较旧的sdk版本编译应用程序

This version of Win2D requires Windows SDK >= 10.0.17134.0, but TargetPlatformVersion is 10.0.16299.0.

编辑:我安装了10.0.17134.0版本,现在一切正常。

相关问题