Adding WP7 Toolkit Controls to the Visual Studio Toolbox
published on: 3/31/2011 | Views: N/A | Tags: WP7Toolkit
by WindowsPhoneGeek
In this post I am going to talk about how to add the Silverlight for Windows Phone 7 Toolkit controls to the Visual Studio Toolbox.
NOTE: By default when creating a Windows Phone 7 application the Visual Studio Toolbox contains only "Windows Phone Controls" tab with the default controls like: ListBox, Button, ToggleButton, Image, etc.
Visual Studio Toolbox support is important when you want to "drag" and "drop" controls into the visual designer even without writing any code. Adding a control from the toolbox also automatically add the necessary namespaces (xmlns) to your page. So as a result you can write a simple WP7 app just with a few mouse clicks.
WP7 Toolkit controls are not automatically added to the Toolbox when you add a reference to Microsoft.Phone.Controls.Toolkit.dll assembly so you will need to add them on your own,
To begin with lets first create a sample WP7 Application project and add a reference to Microsoft.Phone.Controls.Toolkit.dll:
NOTE: In order to use the Toolbox at first you have to open a valid XAML page so that you will be able to "drag" and "drop" controls there.
After that just follow the steps:
1. Go to the Visual Studio Toolbox tab , right click over General and select Add Tab from the context menu:
2. Give some name to the newly created toolbox section. In our case we will create a WP7Toolkit item:
3. Right click over the newly created WP7Toolkit and select Choose Items option from the context menu
4.After that just select the desired controls that you want to be visible in the Toolbox:
5. That`s it. Go to the Toolbox tab and select WP7Toolkit. You should be able to see the WP7 Toolkit control there:
6. Finally, just "drag" and "drop" the desired control over the design surface:
That was all about how to enable Visual Studio Toolbox support for the Silverlight for WP7 Toolkit controls.
I hope that the post was helpful.
You can also follow us on Twitter @winphonegeek
Comments
muy bueo
posted by: dante on 1/26/2012 4:29:18 AM
hola q talkmuy bueno
problems
posted by: Radu Stefan on 1/27/2012 7:13:32 PM
My VS doesn't show the controls from toolkit after adding the dll. Any idea ?
thanks
posted by: brotherb on 3/26/2012 6:20:01 PM
Thank you very much for this toturial, help me a lot!
RE:Problems
posted by: Potato Thrower on 3/27/2012 5:50:42 AM
If your controls are not showing up in the picker, then try clicking the browse button and going to the toolkit assembly.
I had the same problem as you with the controls not showing up in the menu, it seemed to resolve itself after I browsed to the assembly
Our Top Articles & Free books
- Our FREE e-book: "Windows Phone Toolkit In Depth" 2nd edition
- 400+ Windows Phone Development articles in our Article Index
- 21 WP7 Toolkit in Depth articles covering all controls
- 12 WP7 Coding4Fun Toolkit in Depth articles covering all controls
- Performance Tips when creating WP7 apps
- Creating a WP7 Custom Control in 7 Steps
- WP7 working with VisualStates: How to make a ToggleSwitch from CheckBox
- What makes a WP7 App successful
- Creating theme friendly UI in WP7 using OpacityMask
- Implementing Windows Phone 7 DataTemplateSelector and CustomDataTemplateSelector
- All about Splash Screens in WP7 – Creating animated Splash Screen
- Getting Started with Unit Testing in Silverlight for WP7
- WP7 WatermarkedTextBox custom control
Our Top Tips & Samples
- All about WP7 Isolated Storage series
- WP7 Dynamically Generating DataTemplate in code
- 5 tips for a successful WP7 Marketplace submission
- WP7: Navigating to a page in different assembly
- WP7 ContextMenu: answers to popular questions
- WP7 ListBox: answers to popular questions
- WP7 working with Images: Content vs Resource build action
- WP7 Element Binding samples
- WP7 working with XML: reading, filtering and databinding
- Drawing in WP7: #2 Drawing shapes with finger
- WP7 TextBox Light theme problems - the solution
- Changing the WP7 Panorama Background Image dynamically with Animation
