为什么我的xaml只显示一个普通的窗口显示nothig在里面

我是新来的WPF,Xaml,并且是一个C#初学者! 我一直在这个工作,我不知道为什么下面的xaml只是显示一个普通的窗口。 没有button,没有标题,没有内容。 我将不胜感激您的指导。 如果问为什么我不得不使用MediaChecker,我按照Stack Overflow的以下post中的一个例子来做:

我如何从一个Xaml文件导航到另一个?

提前致谢。

<Window x:Class="MediaCheckerWPF.AboutBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="About Media Checker" Height="300" Width="400" ResizeMode="NoResize" ShowInTaskbar="False"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> <RowDefinition Height="28" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="200" /> </Grid.ColumnDefinitions> <Label Grid.Row="0" Grid.Column="0" Content="Name:"/> <Label Grid.Row="1" Grid.Column="0" Content="E-Mail:"/> <Label Grid.Row="2" Grid.Column="0" Content="Comment:"/> <Button Grid.Column="1" Grid.Row="0" HorizontalAlignment="Right" MinWidth="80" Margin="3" Content="START" /> <Button Grid.Column="1" Grid.Row="3" HorizontalAlignment="Right" MinWidth="80" Margin="3" Content="STOP" /> </Grid> </Window> 

你已经呈现的XAML很好。 如果你得到一个空白的窗口,然后我怀疑它与其他的东西,如启动一个不同的窗口。

仔细检查在App.xaml <Application>标记的StartupUri属性中是否启动了正确的Window

 <Application x:Class="MediaCheckerWPF.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="AboutBox.xaml"> <Application.Resources> </Application.Resources> </Application> 

检查App.xaml的StartupUri

 <Application x:Class="GabeTexFilestImport.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml"> <Application.Resources> </Application.Resources> </Application> 

如果系统很慢,我也注意到了这种情况。 说,你正在达到最大的内存消耗,这会减慢你的系统。 在这种情况下,我已经看到了xaml窗口显示,但完全空白,没有控制,没有最小,最大,关闭按钮,没有标题。