First, download a Silverlight toolkit installation package ,:
Http://silverlight.codeplex.com/releases
After the installation, when you try addreference, the Microsoft. Phone. Controls. toolkit still does not appear.
Another step is to put the newly loaded Microsoft. Phone. Controls. toolkit. dll file under the Silverlight directory. The specific path is: Microsoft in the c: \ Program Files \ microsoft sdks \ Windows Phone \ v7.0 \ toolkit \ feb11 \ bin directory. phone. controls. toolkit. copy the DLL file to the C: \ Program Files \ microsoft sdks \ Windows Phone \ v7.0 \ libraries \ Silverlight directory.
In this way, try ference again. Of course you can add it.
Note thatIn ference, the system may prompt: adding a reference to a Silverlight assembly may lead to unexpected application behavior. Do you want to continue? If you ignore this problem, the running program will exit directly.
At this time, we need to confirm whether the WP and toolkit versions are consistent. wp7.0 corresponds to the 7.0 toolkit package and wp7.1 corresponds to the 7.1 toolkit.
After the above preparations are completed, you can actually start using this toolkit.
Step 1: add the reference Microsoft. Phone. Controls. toolkit to the project under construction;
Step 2: Add a namespace:
Xmlns: Toolkit = "CLR-namespace: Microsoft. Phone. controls; Assembly = Microsoft. Phone. Controls. toolkit"
Step 3: actually use each specific control.
Add the control in toolkit to toolbox:
Open the toolbox of Vs, right-click in the blank space, select Add tab, and enter the Toolkit name;
Move the cursor to the new toolkit bar, right-click, and select choose items;
In the displayed dialog box, click Assembly name, reorder, find Microsoft. Phone. Controls. toolkit, select the control in the Assembly, and click OK.
In this way, the control in toolkit is added.
You can drag the widget to add it later.