xamarin.forms汉堡包图标

问题描述 投票:0回答:2

我有母版页和汉堡按钮的问题,当隐藏菜单时,按钮的高度不会填充高度(第一个图像),其他是(第二个图像)。我真的不明白。有人可以帮帮我吗?

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.Impostazioni" Title="{local:Translate TxtImpostazioni}" >
<ContentPage.Content>
    <StackLayout>
        <Label x:Name="Lbl" Text="{local:Translate TxtImpostazioni}"            
          VerticalOptions="CenterAndExpand" 
            HorizontalOptions="CenterAndExpand" />
    </StackLayout>
</ContentPage.Content>

这里的主页

<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>
xaml xamarin.forms hamburger-menu
2个回答
0
投票

据我所知,微软在1809年改变了工具栏项目的高度,你的应用程序似乎没有那么好。所以你不应该使用SDK for 1809来编译应用程序(但是一些较旧的),一切都会好的。


0
投票

非常感谢!

问题是我无法使用较旧的sdk版本编译应用程序,因为我有这个错误

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

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

© www.soinside.com 2019 - 2024. All rights reserved.