Using the Windows Phone Toolkit in WP8 Applications

Visual Studio 2012 for Windows Phone is supplied with a large selection of user interface components enabling you to build Windows Phone 8 applications. There are some components, such as a toggle switch, that are however, not supplied as standard with Visual Studio. This is where the Windows Phone Toolkit comes in.

The Windows Phone Toolkit is developed by the Microsoft Windows Phone developer platform team and

provides the developer community with new components, functionality, and an efficient way to help shape product development

The toolkit provides the following components:

###Installing the Windows Phone Toolkit

Installing the Windows Phone Toolkit is a simple process thanks to NuGet integration within Visual Studio. To install, right click on the project in Visual Studio and select “Manage NuGet Packages…”

On the resulting dialog, search online for “Windows Phone Toolkit”.

Windows Phone Toolkit

Select the “Install” button to install the toolkit into you project.

Windows Phone Toolkit

After a short time, the Windows Phone Toolkit will be installed into your phone project. That’s it. Easy!

###Using the Windows Phone Toolkit in XAML

To use the toolkit within a XAML page, the XML namespace must be referenced for the PhoneApplicationPage. This is achieved by adding the xmlns:toolkit reference to the page as shown below:


Components within the toolkit can now be declared within XAML using the toolkit namespace, e.g.

<toolkit:ToggleSwitch Name="MyToggleSwitch" />