这很奇怪。
我有一个XAML文件,看起来如下...
<Window
x:Name="window"
x:Class="ix.Production.Title"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Title" Height="768" Width="1024"
Loaded="window_Loaded">
<Window.Resources>
etc...
我的代码如下所示...
using System;
using System.Windows;
using System.Windows.Media.Animation;
using System.Threading;
namespace ix.Production
{
public partial class Title : Window
{
public Title()
{
InitializeComponent();
}
....
这段代码无法编译,因为Visual Studio坚持认为InitializeComponent"在当前上下文中不存在。"
我该如何解决这个问题?