Click here to Skip to main content
15,068,433 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I have Windows 7 Ultimate, Visual Studio 2010 Ultimate. I have desire to develop a Windows Phone App with "DatePicker Control" into it.

First of all, I downloaded the “Windows Phone 7 toolkit” from the “Codeplex” website, and I added a namespace on .xaml as follow;
C#
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit".

So, to use DatePicker control, I coded it as follow on .xaml.
C#
<toolkit:DatePicker HorizontalAlignment="Left" Margin="149,219,0,0" Name="txtStartOn" VerticalAlignment="Top" Width="325" Height="55" FontFamily="Verdana" FontSize="13.333" Foreground="#FFDA4D4D" />;

In the MainPage also I added; using Microsoft.Phone.Controls.Toolkit;

But it gives me an error as follow;
The type or Namespace name “Toolkit” does not exist in the Namespace “Microsoft.Phone.Control” (Are you missing an assembly reference?)

After that, manually I loaded “Microsoft.Phone.Controls.Toolkit.dll” from “Add Reference Window” into my Solution Project to fix the error and I can see “Microsoft.Phone.Controls.Toolkit” in my references list, but still I get the same error.

Do you have any idea?

Thanks in advance
Posted

1 solution

Right click on your Microsoft.Phone.Controls.Toolkit.dll reference. Go to properties and search for Local Copy. Set to True.

I think you missing another dll. Let me remember that and I'll improve this solution ;)

Hope it helps.
   
v2
Comments
Dave Crump 23-Aug-12 21:28pm
   
Thank you Christian,
I thought about that before, and I set the Copy Local to True. Maybe you are right and I need another DLL for that, but which one? I have been looking into many many websites for a solution!!
Regards,

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900