开发者

problem integrating silverlight toolkit in VS2010 project

开发者 https://www.devze.com 2023-03-31 02:42 出处:网络
i\'ve installed silverlight toolkit from codeplex (NuGet didn\'t work, feed was empty.. probably working on the project) and after referencing

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 'Toolki开发者_Go百科t' 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!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号