problem integrating silverlight toolkit in VS2010 project

i've installed silverlight toolkit from codeplex (NuGet didn't work, feed was empty.. probably working on the project) and after referencing

Microsoft.Phone.Controls.Toolkit

I get the error :

The type or namespace name 'Toolkit' does not exist in the namespace 'Microsoft.Phone.Controls' (are you missing an assembly reference?)

What could it be?


Because your xmlns is calling it toolbox but the prefix is toolkit .

Change

xmlns:toolbox="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"

to

xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"

Or, change your prefix to toolbox . It doesn't matter what you call it; it just has to be consistent.


In this line you declare toolbox as a name to reference the toolkit

xmlns:toolbox="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"

In this line you reference to the name toolkit

<toolkit:DatePicker Header="Date" Value="9/16/2010" ValueChanged="DatePickerValueChanged"/>

It does not work because those names should be equal. So either declare xmlns:toolkit or reference toolbox:DatePicker

Good luck!

链接地址: http://www.djcxy.com/p/34550.html

上一篇: Silverlight工具箱命名空间“有时”是未知的

下一篇: 在VS2010项目中集成silverlight工具包的问题