XamlParseException未处理. [英] XamlParseException was unhandled.

查看:102
本文介绍了XamlParseException未处理.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好.我遇到了调试WPF-WCF简单聊天应用程序的问题.有一个例外,例如:

Hi there. I faced the problem debugging my WPF-WCF simple chat application. There''s an exception like:

XamlParseException was unhandled. 'The invocation of the constructor on type 'ChatGUI.MainWindow' that matches the specified binding constraints threw an exception.' Line number '3' and line position '9'.


我看到这是XAML异常,所以这里是XAML代码清单:


I see that''s a XAML exception, so here''s the XAML code listing:

<Window x:Class="ChatGUI.MainWindow"

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="35*" />
            <RowDefinition Height="35" />
        </Grid.RowDefinitions>
        <TextBox Height="Auto" HorizontalAlignment="Stretch" Margin="6,6,6,6" Name="textBoxChatPane" VerticalAlignment="Stretch" Width="Auto" Grid.Row="0" />
        <TextBox Height="23" HorizontalAlignment="Stretch" Margin="6,6,6,6" Name="textBoxEntryField" VerticalAlignment="Stretch" Width="Auto" Grid.Row="1" KeyDown="textBoxEntryField_KeyDown" />
    </Grid>
</Window>


您见过同样的问题吗?我很高兴看到所有有用的建议.
在此先感谢.


Have you ever seen the same problem? I would be glad to see every useful advice.
Thanks in advance.

推荐答案

我的猜测是,这条线:
_backend = new ChatBackend.ChatBackend(this.DisplayMessage);
引发异常.

尝试在线路上设置断点并调试应用程序.

如果打开App.xaml,您将看到其中引用了ChatGUI.MainWindow.

最好的问候
Espen Harlinn
My guess is that this line:
_backend = new ChatBackend.ChatBackend(this.DisplayMessage);
throws an exception.

Try setting a breakpoint on the line and debug your application.

If you open the App.xaml, you''ll see that the ChatGUI.MainWindow is referenced there.

Best regards
Espen Harlinn


这篇关于XamlParseException未处理.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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