【问题标题】:XAML Parse ExceptionXAML 解析异常
【发布时间】:2013-09-27 07:13:29
【问题描述】:

我搜索并搜索了答案,我仍然无法理解。这是我的代码

using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;

namespace GTA_5_Guide
{
    public partial class MainPage : PhoneApplicationPage
    {

        //Constructor
        public MainPage()
        { 
            //Loads the page onto the screen           
            InitializeComponent(); //This is were the error is thrown

        }

    }
}

抛出的错误是“System.Windows.ni.dll 中发生'System.Windows.Markup.XamlParseException' 类型的第一次机会异常”

一切正常,直到我决定不再使用我在项目中找到的网页,否则它会引发此错误

【问题讨论】:

  • 你应该发布 MainPage .xaml
  • ...工作正常,直到我决定不使用网页...您是否删除了 MainPage.xaml? :)
  • 您提供的代码没有提供任何线索,您需要显示标记Xaml,尤其是您删除网页的区域。

标签: c# xaml windows-phone-8


【解决方案1】:

10 次中有 9 次这通常只是设计器文件没有继承相同的类型。

确保您的 MainPage 根 XAML 控件是面对面的 <phone:PhoneApplicationPage...

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多