[英]WPF User Control Error
我已經搜索了該論壇,但找不到任何令我滿意的東西。
在Microsoft Visual Studio 2010中,當我嘗試添加WPF用戶控件時,出現此錯誤:
"Value cannot be null. Parameter name: objectType"
然后,當我要選擇托管內容時,出現此錯誤:
"An error occured trying to add references for type 'PolyPuttZe.GameCanvas', or finding the type. Make sure the project references are correct."
我遵循了本教程: http : //www.switchonthecode.com/tutorials/wpf-tutorial-using-wpf-in-winforms
謝謝!
編輯:
這是我寫的代碼:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Integration;
namespace PolyPuttZe
{
public partial class Game : Form
{
public Game()
{
InitializeComponent();
}
}
}
我知道了! 我所做的就是從頭開始。 我刪除了該項目,並在另一台計算機上創建了一個新項目。 然后錯誤消失了,它正在起作用。 感謝所有幫助我的人!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.