The referenced component 'Microsoft.Phone.Controls.Toolkit' could not be found?
It's here though?
It looks like the problem is that you're trying to reference a copy of the Microsoft.Phone.Controls.Toolkit
.dll in your Ref
folder, but Visual Studio is probably looking for somewhere else.
If you open Visual Studio and expand the References folder in the Solution Explorer, you'll probably see that Microsoft.Phone.Controls.Toolkit
is listed but marked with a yellow warning icon.
Try right clicking that and clicking Remove. Then right click on References, browse to file in your Ref
folder, and re-add it.
Update: The ListPicker
is a control in the Silverlight Toolkit for Windows Phone, which is an add in set of controls published by Microsoft. That's the reference you just added back into your app.
When you add a control to the page, you need to add a reference to the .dll to the XAML page and map it to a prefix that will tell Visual Studio where to find the control:
<phone:PhoneApplicationPage x:Class="MyApp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit">
Note the toolkit
prefix.
Now you can add a control like this:
<toolkit:ListPicker></toolkit:ListPicker>
If those items are set up correctly, you might also need to check if the .dll was "blocked" when you downloaded it. Browse to the .dll in Explorer, then right click and look at the bottom for a button called Unblock. If it's there, click it.
The references in the XAML can be tricky to set up. There's a sample app available for the toolkit that can be helpful.
You can install Nuget and use it to install the Toolkit. Add the Toolkit to your project by following the steps below;
PM> install-package WPToolkit
This will install and add the toolkit to your project.
Find the full article here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With