2013-09-26 45 views
0

ive搜索和搜索的答案仍然迴避我。這裏是我的代碼XAML解析異常

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.Markup.XamlParseException’的第一次機會異常出現在System.Windows.ni.dll」

一切工作正常直到我決定不再使用我在我的項目中發現的網頁時,它會拋出此錯誤

+0

你應該張貼的MainPage的.xaml – tofutim

+0

...做工精細,直到我決定不使用網頁...你刪除MainPage.xaml中? :) – tofutim

+1

您給出的代碼並沒有提供任何線索,您需要顯示標記'Xaml',特別是您刪除網頁的區域。 –

回答

0

9倍於10這通常只是設計器文件不會繼承相同的類型。

確保你的根的MainPage XAML控制在面對面<phone:PhoneApplicationPage...