Error in Xamarin Forms Timeout exceeded getting exception details

1

Could you help me with this exception error in xamarin, I can not find the error, I'm doing a MasterDetailPage, the other pages work invividually including the menu

This is where the error marks me

 private void InitializeComponent()
    {
        global::Xamarin.Forms.Xaml.Extensions.LoadFromXaml(this, typeof(MasterPage));
        Navigator = global::Xamarin.Forms.NameScopeExtensions.FindByName<global::Xamarin.Forms.NavigationPage>(this, "Navigator");
    }

this is my code in xaml

    *<?xml version="1.0" encoding="utf-8" ?>
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:pages="clr-namespace:ProyectoAnimalCared.Pages;assembly=ProyectoAnimalCared"
             x:Class="ProyectoAnimalCared.Pages.MasterPage">
    <MasterDetailPage.Master>
        <pages:MenuPage></pages:MenuPage>
    </MasterDetailPage.Master>
    <MasterDetailPage.Detail>
        <NavigationPage x:Name="Navigator"
                    BarBackgroundColor="{StaticResource MainColor}">
            <x:Arguments>
                <pages:MainPage>
                </pages:MainPage>
            </x:Arguments>
        </NavigationPage>
    </MasterDetailPage.Detail>
</MasterDetailPage>*


    namespace ProyectoAnimalCared.Pages
{

    public partial class MasterPage : MasterDetailPage
    {
        public MasterPage()
        {
            InitializeComponent();
        }

        protected override void OnAppearing()
        {
            base.OnAppearing();
            App.Master = this;
            App.Navigator = this.Navigator;
        }
    }
    
asked by Daniel 10.10.2017 в 19:39
source

1 answer

1

The error was that I had chosen the Master Detail Page element which I only changed it for Content Page .

In order to solve this problem, I only re-created a page, select the content page option:

Creating the Content Page:

Then I included the following code to the page:

In xaml :

<?xml version="1.0" encoding="utf-8"?>
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:pages="clr-namespace:ProyectoAnimalCared.Pages;assembly=ProyectoAnimalCared" x:Class="ProyectoAnimalCared.Pages.MasterPage">
    <MasterDetailPage.Master>
        <pages:MenuPage></pages:MenuPage>
    </MasterDetailPage.Master>
    <MasterDetailPage.Detail>
        <NavigationPage x:Name="Navigator" BarBackgroundColor="{StaticResource MainColor}">
            <x:Arguments>
                <pages:MainPage></pages:MainPage>
            </x:Arguments>
        </NavigationPage>
    </MasterDetailPage.Detail>
</MasterDetailPage>

In the xaml.cs I included the following code:

namespace ProyectoAnimalCared.Pages
{

    public partial class MasterPage : MasterDetailPage
    {
        public MasterPage()
        {
            InitializeComponent();
        }

        protected override void OnAppearing()
        {
            base.OnAppearing();
            App.Master = this;
            App.Navigator = this.Navigator;
        }
    }
}
    
answered by 13.10.2017 в 20:27