2
votes

I'm trying to a add a list of numbers like in the picture below to a page in a Windows Phone 8.1 app, but I can't find the looping selector control in the toolbox to acheive this:

http://www.geekchamp.com/articles/wp7-loopingselector-in-depth--part1-visual-structure-and-api

I've tried to add the missing control by right clicking on the toolbox and adding a control but its not there.

This is how I've achieved picking a time using the coding4fun time span picker:

<c4fToolkit:TimeSpanPicker Header="Rest Interval" x:Name="restTimeSpanPkr" Max="12:59:59" Step="1:1:1" Margin="-12,323,12,-278" Grid.RowSpan="2"/>

Does anyone have any idea how to add the missing tool or is there a different way of achevingthis in Windows phone 8.1?

toolbox missing looping selector

list of numbers

1
Did you follow the article? "To begin using LoopinSelector first add a reference to the Microsoft.Phone.Controls.Toolkit.dll assembly which is installed with the toolkit and you can find it in ...". I don't use the toolbox personally so I'm not sure if custom components show up there. In general I wouldn't recommend using WP7 controls on 8.1 anyway, many of the styles will be missing or wrong.rikkit
@rikkit I've added the toolkit to the project and there is a reference in my references folder and also the apporpriate namespace has been added to my page's XAML , yet when I try to add a looping selector it still gives me the following namespace prefix primitives is not defined , any ideas as to why?Brian J

1 Answers

3
votes

Install the Windows Phone Toolkit using NuGet or download it on their website: The Windows Phone Toolkit

If the toolkit is successfully installed the reference folder should look like this

enter image description here

Then add the Primitive namespace to the XAML file.

<phone:PhoneApplicationPage
    xmlns:toolkit_primitives="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit">

Then you can use the looping selector.

<toolkit_primitives:LoopingSelector>
    <primitives:LoopingSelector.ItemTemplate>
        <DataTemplate>
             <!-- design your own square box+text -->
        </DataTemplate>
    </primitives:LoopingSelector.ItemTemplate>      
</toolkit_primitives:LoopingSelector>

Intellisense should pick it up as well

enter image description here