【发布时间】:2019-03-22 03:32:51
【问题描述】:
我的 Xamarin.Forms 出现问题,不想再加载,它一直给我错误消息
Unable to cast object of type 'System.RuntimeType' to type 'Mono.Debugger.Soft.TypeMirror'.
我的代码 ATM 是
MainPage.xaml.cs:
public partial class MainPage : MasterDetailPage
{
public MainPage()
{
InitializeComponent();
}
}
MainPage.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:local="clr-namespace:Hoofdstuk04"
x:Class="Hoofdstuk04.MainPage">
<MasterDetailPage.Master>
<ContentPage Title="Master">
<StackLayout>
<!-- Click event method nog toevoegen -->
<Button Text="RandomColorPage"></Button>
<Button Text="CarouselPage"></Button>
</StackLayout>
</ContentPage>
</MasterDetailPage.Master>
<MasterDetailPage.Detail>
<NavigationPage>
<x:Arguments>
<!--<local:ImageViewerPage />-->
</x:Arguments>
</NavigationPage>
</MasterDetailPage.Detail>
</MasterDetailPage>
有人知道我为什么会收到这个错误吗?我唯一改变的是代码中 MainPage 从 ContentPage 到 MasterDetailPage
的继承【问题讨论】:
标签: c# xaml xamarin.forms