2010-09-24 64 views
1

需要一些幫助,通常模糊的Visual Studio 2008錯誤。「標籤」不存在於命名空間'System.Windows.Controls'

錯誤:

Error 3 The type or namespace name 'Label' does not exist in the namespace 'System.Windows.Controls' (are you missing an assembly reference?) 

相關代碼:

internal System.Windows.Controls.Label DescriptionLabel; 

我相信這件事情做的Silverlight,但我已經爲Silverlight 3的SDK從這裏http://silverlight.codeplex.com/releases/view/36060安裝。 使用Windows 7 x64和Visual Studio 2008 SP1。

據我所知,我不缺少任何項目中的任何程序集引用。

回答

2

確保您在項目中引用了System.Windows.Controls.Data.Input.dll程序集。

+0

我在項目中引用了這個 – 2010-09-24 04:24:03

1

我建議你在這裏考慮看看:Is there no Label control in Silverlight?

看來,如果你的目標SL2沒有Label控件,如果你的目標SL3你需要下載該工具包。

+0

我安裝了SL3工具包。奇怪,但錯誤仍然出現 – 2010-09-24 03:34:19

2

看來,微軟已經刪除label或在Silverlight 3的被重命名我的假設是,項目所需的Silverlight 3下,但實際上它使用的Silverlight 2

安裝Silverlight 2 Toolkit March 2009解決的問題。

+0

+1爲解決您自己的問題 – 2010-10-01 15:24:27

相關問題