Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/xamarin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xaml 为什么会有";“汉堡包”;没有显示吗?我想通过点击汉堡图标进入菜单页面_Xaml_Xamarin_Xamarin.forms - Fatal编程技术网

Xaml 为什么会有";“汉堡包”;没有显示吗?我想通过点击汉堡图标进入菜单页面

Xaml 为什么会有";“汉堡包”;没有显示吗?我想通过点击汉堡图标进入菜单页面,xaml,xamarin,xamarin.forms,Xaml,Xamarin,Xamarin.forms,这是我为创建母版详细信息页面而编写的代码: 请检查一下 <?xml version="1.0" encoding="utf-8" ?> <MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="DemoApp.MenuPage" xmlns:local="clr-namesp

这是我为创建母版详细信息页面而编写的代码:
请检查一下

<?xml version="1.0" encoding="utf-8" ?>
    <MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="DemoApp.MenuPage" xmlns:local="clr-namespace:DemoApp.Views" MasterBehavior="Default">
       <MasterDetailPage.Master>
          <ContentPage Title="MenuPage" Icon="menuIcon.png" Padding="0,50,0,0">
             <ContentPage.Content>
                <StackLayout VerticalOptions="Start">
                   <Button Text="Home" />
                   <Button Text="Login" />
                   <Button Text="Logout" />
                   <Button Text="Exit" />
                </StackLayout>
             </ContentPage.Content>
          </ContentPage>
       </MasterDetailPage.Master>
       <MasterDetailPage.Detail>
          <local:Login/>
       </MasterDetailPage.Detail>
    </MasterDetailPage>

我已经在一个普通项目中检查了您的代码,到目前为止没有任何错误,需要进一步检查详细页面代码。我指的是

   <MasterDetailPage.Detail>
      <local:Login/>
   </MasterDetailPage.Detail>


来自Xamarin 4.0,使用
Shell
可以更轻松地实现此
MasterDetailPage
功能。David制作了一个视频,演示如何使用
Shell
。他的

我发现了问题所在。汉堡包图标没有显示,因为我没有把它放在一个街区内。添加以下内容后,该问题已得到修复:的可能重复项