如何使用c#.net在Windows Phone 8中解决此异常,My Exception是“System.Windows.ni.dll”中出现的类型'System.Windows.Markup.XamlParseException'的第一次机会异常。 [英] How can i solve this Exception in windows phone 8 using c#.net,My Exception is that "A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in System.Windows.ni.dll".

查看:80
本文介绍了如何使用c#.net在Windows Phone 8中解决此异常,My Exception是“System.Windows.ni.dll”中出现的类型'System.Windows.Markup.XamlParseException'的第一次机会异常。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的先生/女士,


我遇到了一个例外情况:"System.Windows.Markup.XamlParseException类型的第一次机会异常"发生在System.Windows.ni.dll"。如何解决这个问题。请帮我解决这个例外。

第一页: -  

public MainPage()
{
InitializeComponent();
_10MinClass._10MinStaticClass.csFileName = fileName;
ProjectFile();
//本地化ApplicationBar的示例代码
// BuildLocalizedApplicationBar();
}
private async Task< String> ProjectFile()
{
try
{
/// var _Folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
// _Folder = await _Folder.GetFolderAsync(" MyFolder");

//获取文件
/// var _File = await _Folder.GetFileAsync(fileName);
//等待_Folder.GetFileAsync(fileName);
//ClassMyCity.csFindingFile = _File.ToString();
// string fi = ClassMyCity.csFindingFile;


StorageFolder folder = ApplicationData.Current.LocalFolder;

StorageFile file = await folder.GetFileAsync(fileName);
_10MinClass._10MinStaticClass.csFindingFile = file.Name.ToString();

string fi = _10MinClass._10MinStaticClass.csFindingFile;
if(_10MinClass._10MinStaticClass.csFindingFile!="")
{
fileData = LoadFromFile();
if(fileData!="")
{
try
{

// _10MinClass._10MinStaticClass.csRegisteredFullData = fileData;
_10MinClass._10MinStaticClass.csUidAndPwd = fileData;
//// Uri urri = new Uri(" /MainPage.xaml" ;, UriKind.Relative);
////aum.MapUri(urri);
//返回新的Uri(" /myCityCitizenHomePage.xaml",UriKind.Relative);
NavigationService.Navigate(new Uri(" /10MinUserRememberPage.xaml",UriKind.RelativeOrAbsolute));

// NavigationService.Navigate(new Uri(" /myCityCitizenHomePage.xaml",UriKind.Relative));
}
catch(exception ex)
{
//NavigationService.Navigate(new Uri(" /myCityCitizenHomePage.xaml",UriKind.Relative));
//MessageBox.Show("Navigation page Exception: - " + ex);
返回null;

}

}
其他
{
MessageBox.Show("GPRS和SMS费用将由您的移动运营商征收) 。使用MyCity应用程序提供的所有服务,第一次必须进行手机号码注册。");" +" \\\\ n
}

}
其他
{

}
返回null;
}
catch
{

返回null;
}
//返回null;
}

关联Uri Mapper代码类文件。

 

使用Microsoft.Phone.Shell;
使用_10Min.Resources;
使用System.Windows.Media;
使用System.IO.IsolatedStorage;
使用System.IO;
使用System.Threading.Tasks;
使用Windows.Storage;
使用Microsoft.Phone.Tasks;
使用_10Min;
namespace _10Min
{
//公共抽象类UriMapperBase1
// {
//}
类AssociationUriMapper:UriMapperBase
{
private string tempUri;
私有字符串fileData;
const string fileName =" tenMinUserContent.dat" ;;

public AssociationUriMapper()
{
ProjectFile();
fileData = this.LoadFromFile();
}

公开覆盖Uri MapUri(Uri uri)
{

// fileData = ClassMyCity.csRegisteredFullData;
//// if(ClassMyCity.csTempUri =="")
//// {
tempUri = uri.ToString();
if(String.IsNullOrEmpty(fileData))
{
fileData = this.LoadFromFile(); //重试一次
//if(!String.IsNullOrEmpty(fileData))
// {
//返回新的Uri(tempUri,UriKind.Relative);
//}
}
if(!String.IsNullOrEmpty(fileData))
{
if(tempUri ==" /10MinUserRememberPage.xaml")
{
返回新的Uri(< /10MinUserRememberPage.xaml",UriKind.Relative); //" /myCityCitizenHomePage.xaml"
}
其他
{
//ClassMyCity.csTempUri = tempUri;
返回新的Uri(tempUri,UriKind.Relative); //" /myCityCitizenHomePage.xaml"
}
}
//否则执行正常启动。

返回uri;
}

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP;&NBSP;&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP;   

 私人字符串LoadFromFile()
  &NBSP; &NBSP; &NBSP; {
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; //设置文件名

  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP;尝试
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; {
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; ///<总结>&
NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; ///获取用户商店,然后在商店中打开文件
  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; ///最后阅读文件的内容并将其返回
  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; ///< /总结>

&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP;使用(var store = IsolatedStorageFile.GetUserStoreForApplication())
  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; using(var readStream = new IsolatedStorageFileStream(fileName,System.IO.FileMode.Open,store))
  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; using(var reader = new System.IO.StreamReader(readStream))
  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; {
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; return reader.ReadToEnd();
  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; }
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; }
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; catch(例外)
  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; {
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; return String.Empty;
  &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; }
&NBSP; &NBSP; &NBSP; &NBSP; }

}

 

App.xaml.c

s file

private void InitializePhoneApplication()
{
if(phoneApplicationInitialized)
return;

//创建框架但不要将其设置为RootVisual;这允许splash
//屏幕保持活动状态,直到应用程序准备好呈现为止。
RootFrame = new PhoneApplicationFrame();

RootFrame.UriMapper = new AssociationUriMapper();
RootFrame.Navigated + = CompleteInitializePhoneApplication;


//处理导航失败
RootFrame.NavigationFailed + = RootFrame_NavigationFailed;

//处理重置请求以清除后台堆栈
RootFrame.Navigated + = CheckForResetNavigation;

//确保我们不再初始化
phoneApplicationInitialized = true;
}

第二页: - 异常来自IntializeComponent的Debugg点

 public _10MinUserPages()
{
InitializeComponent(); ------异常来自
tblUserId.Text = _10MinClass._10MinStaticClass.uid;
msgUserPages = _10MinClass._10MinStaticClass.csUserPages;
// msgUserPages = NavigationContext.QueryString [" pages"];
// listmenu();

// msgUserPages = NavigationContext.QueryString [" pages"];

listmenu();


}


xaml代码: -

< phone:PhoneApplicationPage 
x:Class =" _10Min._10MinUserPages"
xmlns:vsm =" clr-namespace:System.Windows; assembly = System.Windows"
xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x =" http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone =" clr-namespace:Microsoft.Phone.Controls; assembly = Microsoft.Phone"
xmlns:shell =" clr-namespace:Microsoft.Phone.Shell; assembly = Microsoft.Phone"
xmlns:d =" http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
FontFamily =" {StaticResource PhoneFontFamilyNormal}"
FontSize =" {StaticResource PhoneFontSizeNormal}"
Foreground =" {StaticResource PhoneForegroundBrush}"
SupportedOrientations =" Portrait"取向= QUOT;肖像"
mc:Ignorable =" d"
shell:SystemTray.IsVisible =" True" BackKeyPress = QUOT; PhoneApplicationPage_BackKeyPress">

<! - LayoutRoot是放置所有页面内容的根网格 - >
< Grid x:Name =" LayoutRoot"背景= QUOT;透明">
< Grid.RowDefinitions>
< RowDefinition Height =" Auto" />
< RowDefinition Height =" *" />
< /Grid.RowDefinitions>

<! - TitlePanel包含应用程序的名称和页面标题 - >
< StackPanel Background =" CornflowerBlue"余量= QUOT; 0,2,-6,32">
< Image x:Name =" imgUser"源= QUOT; /Assets/10minIcons/icon1.png"能见度= QUOT;可见"余量= QUOT; 0,&-2,421,0 QUOT;高度= QUOT; 58" />
<! - < Image x:Name =" imgUserLogout"源= QUOT; /Assets/10minIcons/logout1.png"能见度= QUOT;可见" RenderTransformOrigin = QUOT; 1.909,1.771"余量= QUOT; 420&-50,10,0 QUOT;高度= QUOT; 41" /> - >
< Button x:Name =" btnUserLogout"了borderThickness = QUOT; 0"能见度= QUOT;可见"余量= QUOT; 410,-65,0,0"高度= QUOT; 70"点击= QUOT; btnUserLogout_Click">
< Image x:Name =" imgUserLogout"源= QUOT; /Assets/10minIcons/logout1.png"能见度= QUOT;可见"高度= QUOT; 34" />
< / Button>
< TextBlock x:Name =" tblUserId"文本= QUOT;"前景= QUOT;紫色"的Horizo​​ntalAlignment = QUOT;中心"字号= QUOT; 38" Style =" {StaticResource PhoneTextTitle1Style}"余量= QUOT; 110,-50,101,0"高度= QUOT; 32"宽度= QUOT; 275" />


< / StackPanel>
<! - < StackPanel Grid.Row =" 0"余量= QUOT; 0,-10,0,10" Grid.RowSpan = QUOT; 2英寸RenderTransformOrigin = QUOT; 0.489,0.508">

< Image Source =" Assets / GroupCommImages / mg2flashicon.png"能见度= QUOT;可见"高度= QUOT; 120"宽度= QUOT; 120" />
< TextBlock Text =" 10MIN PAGES" TextAlignment = QUOT;中心"字号= QUOT; 34"前景= QUOT;深粉红" Style =" {StaticResource PhoneTextNormalStyle}" />
< / StackPanel> - >

<! - ContentPanel - 在此处添加其他内容 - >

< Grid x:Name =" ContentPanel" Grid.Row = QUOT 1 QUOT;余量= QUOT; 12,0,12,0">
< Grid.RowDefinitions>
< RowDefinition Height =" 243 *" />
< RowDefinition Height =" 13 *" />
< /Grid.RowDefinitions>
<! - < ScrollViewer Name =" scrollViewer"余量= QUOT; 0" VerticalAlignment = QUOT;陀螺" VerticalScrollBarVisibility = QUOT;隐藏"背景= QUOT;#CC000000" Horizo​​ntalScrollBarVisibility = QUOT;禁用"> - >

< phone:LongListSelector x:Name =" userPageLongListSelector" DataContext =" {Binding listData}" IsGroupingEnabled = QUOT假QUOT;的SelectionChanged = QUOT; userPageLongListSelector_SelectionChanged"余量= QUOT; 0150,-29,42">

< phone:LongListSelector.ItemTemplate>
< DataTemplate>
<! - < StackPanel Orientation =" Horizo​​ntal">
< Image Name =" PlayPause" Source =" {Binding ImgUrl}"高度= QUOT; 70"伸展= QUOT;填写" /> - >
<! - < Image Name =" img"源= QUOT; /Assets/TaskCompleted.png"高度= QUOT; 100"伸展= QUOT;填写" /> - >
<! - < Image Name =" img"源= QUOT; /Assets/TaskCompleted.png"的Horizo​​ntalAlignment = QUOT;左"高度= QUOT; 100"余量= QUOT; 330,507,0,0" VerticalAlignment = QUOT;陀螺"宽度= QUOT; 100" /> - >
< StackPanel>
< TextBlock Text =" {Binding userPages}"字号= QUOT; 30英寸;前景= QUOT;青色" TextWrapping = QUOT;包覆与QUOT; Style =" {StaticResource PhoneTextExtraLargeStyle}" />
< / StackPanel>
<! - < / StackPanel> - >

< / DataTemplate>
< / phone:LongListSelector.ItemTemplate>
< / phone:LongListSelector>
<! - < / ScrollViewer> - >
< / Grid>
< / Grid>

< / phone:PhoneApplicationPage>

解决方案


问题不在于后台代码。这是由于XAML。


看一下与此页面相关的XAML文件(即。)你的'_10MinUserPages'


一般会出现问题您已披露标签



您可能会引用无效的样式密钥


或 


你在XAML中声明了一些事件但没有定义它。


分享你的xaml以便我们可以调查它。


&NBSP;


Dear Sir/Madam,

I  am suffering with one exception that "A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in System.Windows.ni.dll".How can i solve this problem. Please Help me to solve this Exception.

First Page:-

        public MainPage()
        {
            InitializeComponent();
            _10MinClass._10MinStaticClass.csFileName = fileName;
            ProjectFile();
            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }
        private async Task<String> ProjectFile()
        {
            try
            {
                ///var _Folder = Windows.ApplicationModel.Package.Current.InstalledLocation;
                // _Folder = await _Folder.GetFolderAsync("MyFolder");

                // acquire file
                ///var _File = await _Folder.GetFileAsync(fileName);
                //await _Folder.GetFileAsync(fileName);
                //ClassMyCity.csFindingFile = _File.ToString();
                //string fi = ClassMyCity.csFindingFile;


                StorageFolder folder = ApplicationData.Current.LocalFolder;

                StorageFile file = await folder.GetFileAsync(fileName);
                _10MinClass._10MinStaticClass.csFindingFile = file.Name.ToString();

                string fi = _10MinClass._10MinStaticClass.csFindingFile;
                if (_10MinClass._10MinStaticClass.csFindingFile != "")
                {
                    fileData = LoadFromFile();
                    if (fileData != "")
                    {
                        try
                        {

                         // _10MinClass._10MinStaticClass.csRegisteredFullData = fileData;
                          _10MinClass._10MinStaticClass.csUidAndPwd = fileData;
                            ////Uri urri = new Uri("/MainPage.xaml", UriKind.Relative);
                            ////aum.MapUri(urri);
                            //return new Uri("/myCityCitizenHomePage.xaml", UriKind.Relative);
                          NavigationService.Navigate(new Uri("/10MinUserRememberPage.xaml", UriKind.RelativeOrAbsolute));
                            
                            // NavigationService.Navigate(new Uri("/myCityCitizenHomePage.xaml", UriKind.Relative));
                        }
                        catch (Exception ex)
                        {
                            //NavigationService.Navigate(new Uri("/myCityCitizenHomePage.xaml", UriKind.Relative));
                            //MessageBox.Show("Navigation page Exception:-" + ex);
                            return null;

                        }

                    }
                    else
                    {
                        MessageBox.Show("GPRS and SMS charges will be as levied by your mobile operator." + "\r\n" + "To use all services provided by MyCity application, Mobile number registration is mandatory for the first time.");
                    }

                }
                else
                {

                }
                return null;
            }
            catch
            {

                return null;
            }
            // return null;
        }

Association Uri Mapper Code class file.

using Microsoft.Phone.Shell; using _10Min.Resources; using System.Windows.Media; using System.IO.IsolatedStorage; using System.IO; using System.Threading.Tasks; using Windows.Storage; using Microsoft.Phone.Tasks; using _10Min; namespace _10Min { //public abstract class UriMapperBase1 //{ //} class AssociationUriMapper : UriMapperBase { private string tempUri; private string fileData; const string fileName = "tenMinUserContent.dat"; public AssociationUriMapper() { ProjectFile(); fileData = this.LoadFromFile(); } public override Uri MapUri(Uri uri) { // fileData = ClassMyCity.csRegisteredFullData; ////if (ClassMyCity.csTempUri == "") ////{ tempUri = uri.ToString(); if (String.IsNullOrEmpty(fileData)) { fileData = this.LoadFromFile(); // retry once. //if(!String.IsNullOrEmpty(fileData)) //{ // return new Uri(tempUri, UriKind.Relative); //} } if (!String.IsNullOrEmpty(fileData)) { if (tempUri == "/10MinUserRememberPage.xaml") { return new Uri("/10MinUserRememberPage.xaml", UriKind.Relative);//"/myCityCitizenHomePage.xaml" } else { //ClassMyCity.csTempUri = tempUri; return new Uri(tempUri, UriKind.Relative);//"/myCityCitizenHomePage.xaml" } } // Otherwise perform normal launch. return uri; }

                            

 private string LoadFromFile()
        {
            //Setting the fileName

            try
            {
                ///<summary>
                ///get the user Store and then open the file in the store
                ///finally read the content to the file and return it
                ///</summary>

                using (var store = IsolatedStorageFile.GetUserStoreForApplication())
                using (var readStream = new IsolatedStorageFileStream(fileName, System.IO.FileMode.Open, store))
                using (var reader = new System.IO.StreamReader(readStream))
                {
                    return reader.ReadToEnd();
                }
            }
            catch (Exception)
            {
                return String.Empty;
            }
        }

}

App.xaml.c

s file private void InitializePhoneApplication() { if (phoneApplicationInitialized) return; // Create the frame but don't set it as RootVisual yet; this allows the splash // screen to remain active until the application is ready to render. RootFrame = new PhoneApplicationFrame(); RootFrame.UriMapper = new AssociationUriMapper(); RootFrame.Navigated += CompleteInitializePhoneApplication; // Handle navigation failures RootFrame.NavigationFailed += RootFrame_NavigationFailed; // Handle reset requests for clearing the backstack RootFrame.Navigated += CheckForResetNavigation; // Ensure we don't initialize again phoneApplicationInitialized = true; }

2nd page:- Exception is came at come the Debugg point at IntializeComponent

 public _10MinUserPages()
        {
            InitializeComponent();------Exception is came here
            tblUserId.Text = _10MinClass._10MinStaticClass.uid;
            msgUserPages = _10MinClass._10MinStaticClass.csUserPages;
            //msgUserPages = NavigationContext.QueryString["pages"];
            //listmenu();
            
           // msgUserPages = NavigationContext.QueryString["pages"];
           
                listmenu();
           

        }


xaml code:-

<phone:PhoneApplicationPage
    x:Class="_10Min._10MinUserPages"
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True" BackKeyPress="PhoneApplicationPage_BackKeyPress">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel  Background="CornflowerBlue" Margin="0,2,-6,32">
            <Image x:Name="imgUser"   Source="/Assets/10minIcons/icon1.png" Visibility="Visible" Margin="0,-2,421,0" Height="58"/>
            <!--<Image x:Name="imgUserLogout"   Source="/Assets/10minIcons/logout1.png" Visibility="Visible" RenderTransformOrigin="1.909,1.771" Margin="420,-50,10,0" Height="41"/>-->
            <Button x:Name="btnUserLogout"  BorderThickness="0"  Visibility="Visible"  Margin="410,-65,0,0" Height="70" Click="btnUserLogout_Click">
                <Image x:Name="imgUserLogout"   Source="/Assets/10minIcons/logout1.png" Visibility="Visible" Height="34"/>
            </Button>
            <TextBlock x:Name="tblUserId" Text="" Foreground="Purple" HorizontalAlignment="Center" FontSize="38"  Style="{StaticResource PhoneTextTitle1Style}" Margin="110,-50,101,0"  Height="32" Width="275"/>


        </StackPanel>
        <!--<StackPanel Grid.Row="0" Margin="0,-10,0,10" Grid.RowSpan="2" RenderTransformOrigin="0.489,0.508">

            <Image Source="Assets/GroupCommImages/mg2flashicon.png" Visibility="Visible" Height="120" Width="120"/>
            <TextBlock Text="10MIN PAGES" TextAlignment="Center" FontSize="34" Foreground="DeepPink" Style="{StaticResource PhoneTextNormalStyle}"/>
        </StackPanel>-->

        <!--ContentPanel - place additional content here-->

        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="243*"/>
                <RowDefinition Height="13*"/>
            </Grid.RowDefinitions>
            <!--<ScrollViewer Name="scrollViewer" Margin="0" VerticalAlignment="Top" VerticalScrollBarVisibility="Hidden" Background="#CC000000" HorizontalScrollBarVisibility="Disabled">-->

            <phone:LongListSelector x:Name="userPageLongListSelector"  DataContext="{Binding listData}" IsGroupingEnabled="False" SelectionChanged="userPageLongListSelector_SelectionChanged" Margin="0,150,-29,42">

                <phone:LongListSelector.ItemTemplate>
                    <DataTemplate>
                        <!--<StackPanel Orientation="Horizontal">
                            <Image Name="PlayPause" Source="{Binding ImgUrl}" Height="70" Stretch="Fill"/>-->
                        <!--<Image Name="img" Source="/Assets/TaskCompleted.png" Height="100" Stretch="Fill"/>-->
                        <!--<Image Name="img" Source="/Assets/TaskCompleted.png" HorizontalAlignment="Left" Height="100" Margin="330,507,0,0" VerticalAlignment="Top" Width="100"/>-->
                        <StackPanel>
                            <TextBlock Text="{Binding userPages}" FontSize="30" Foreground="Cyan"  TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
                        </StackPanel>
                        <!--</StackPanel>-->

                    </DataTemplate>
                </phone:LongListSelector.ItemTemplate>
            </phone:LongListSelector>
            <!--</ScrollViewer>-->
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>

解决方案

Hi,

Problem will not be with the background code. Its due to XAML.

Have a look at the XAML file associated with this page (ie.) your '_10MinUserPages'

Problem occurs generally when you have disclosed tags

or

you may be referring an invalid style key

or 

You declared some event in XAML but no defining it.

Share your xaml so that we can look into that.

 


这篇关于如何使用c#.net在Windows Phone 8中解决此异常,My Exception是“System.Windows.ni.dll”中出现的类型'System.Windows.Markup.XamlParseException'的第一次机会异常。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆