Alex
Alex

Reputation: 11137

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?

Upvotes: 2

Views: 1773

Answers (2)

vcsjones
vcsjones

Reputation: 141638

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.

Upvotes: 1

Tom Verhoeff
Tom Verhoeff

Reputation: 1270

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!

Upvotes: 1

Related Questions