user88975
user88975

Reputation: 610

Windows phone wrapPanel does not exist error

I have a xaml which has the following code.

<ListBox.ItemsPanel>
    <ItemsPanelTemplate>
        <toolkit:WrapPanel Orientation="Horizontal"/>
    </ItemsPanelTemplate>
</ListBox.ItemsPanel>

Now the error says that The name wrappanel does exist in the namespace clr-namespace:Microsoft.Phone.Controls etc...

Any idea how to fix it.

Upvotes: 1

Views: 1379

Answers (3)

Vivek Saurav
Vivek Saurav

Reputation: 2275

It's not working because Windows Phone toolkit is only available for

Windows Phone Silverlight Applications.

Upvotes: 0

user88975
user88975

Reputation: 610

Try reinstalling the package, it worked

Upvotes: 0

Toni Petrina
Toni Petrina

Reputation: 7112

You need to add the namespace to the root element of the page and you also need to reference it in your project either directly from the disk or by using NuGet:

Install-Package WPToolkit

In your XAML add the following:

xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"

Upvotes: 2

Related Questions