WPF演示框架例外

时间:2014-02-24 14:03:01

标签: c# wpf

我的WPF应用程序出现问题,引发以下异常:

An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in PresentationFramework.dll

Additional information: Exception has been thrown by the target of an invocation.

异常发生在:{/ p>上的InitializeComponent();

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="NationStates_Telegram_Suite.MainWindow"
        Title="NationStates Telegram Suite" Height="475" Width="610"
        ResizeMode="CanMinimize">

的xaml。 VS给了我一个进入dll的选项,如果有帮助,它会在这一行被破坏:55F94E4B push dword ptr [ebp+8]

我已经评论了所有我认为我试图评论我所知道的所有代码更改的内容。如果有办法从中获取更多信息,我很乐意这样做以获取该信息。

EDIT 我的用法:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Diagnostics;

参考文献:

Microsoft.CSharp
PresentationCore
PresentationFramework
System
System.Core
System.Data
System.Data.DataSetExtensions
System.Web
System.Xaml
System.Xml
System.Xml.Linq
WindowBase

1 个答案:

答案 0 :(得分:1)

删除xaml中的所有绑定,直到问题停止。可能存在正在发生绑定和初始化的竞争条件。

相关问题