【问题标题】:xamarin.forms hamburger iconxamarin.forms 汉堡包图标
【发布时间】:2019-03-19 15:43:04
【问题描述】:

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

非常感谢。

这里要显示的页面

<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


    【解决方案1】:

    据我所知,Microsoft 已在 1809 年更改了工具栏项的高度,而您的应用似乎无法很好地处理。所以你不应该使用 SDK for 1809 来编译应用程序(但有些旧),一切都会好起来的。

    【讨论】:

      【解决方案2】:

      非常感谢!

      问题是我不能用旧版本的 sdk 编译应用程序,因为我有这个错误

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

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-05-30
        • 1970-01-01
        • 1970-01-01
        • 2021-12-14
        • 1970-01-01
        • 2023-03-10
        • 2017-06-09
        • 2019-12-03
        相关资源
        最近更新 更多