Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wpf 收到一封“信”;“确保事件失败”;错误_Wpf_Xaml - Fatal编程技术网

Wpf 收到一封“信”;“确保事件失败”;错误

Wpf 收到一封“信”;“确保事件失败”;错误,wpf,xaml,Wpf,Xaml,试图使用事件处理程序添加Loaded=“”,但出现错误页面。我不知道我的XAML代码是否有错误。如果你有任何想法,错误可能是什么/在哪里,你能解释一下问题吗 哎呀,忘了在mainwindow.cs中大写我的命名空间了 <Window x:Class="AppTest.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://

试图使用事件处理程序添加Loaded=“”,但出现错误页面。我不知道我的XAML代码是否有错误。如果你有任何想法,错误可能是什么/在哪里,你能解释一下问题吗

哎呀,忘了在mainwindow.cs中大写我的命名空间了

   <Window x:Class="AppTest.MainWindow"
        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"
        xmlns:local="clr-namespace:AppTest"
        mc:Ignorable="d"
        Title="AppTest" Height="500" Width="1000" Background="Black">
   </Window>


非常愚蠢的错误。

这就是答案吗?
   namespace Apptest
   namespace AppTest