I came across the new Toolkit for Windows Phone that has the ListPicker control. Now after my searching I wanted to ask you people if I could actually select multiple items in a Listpicker and then use them?
I've completed the adding and selecting multiple items part by using SelectionMode="Multiple"
The XAML Code:
<toolkit:ListPicker x:Name="TopStoriesListPicker" Margin="0" Header="Top Stories" Width="422" SelectionMode="Multiple" FullModeHeader="Top Stories" TabNavigation="Local" Style="{StaticResource ListPickerStyle1}">
<sys:String>BBC</sys:String>
<sys:String>CNN</sys:String>
<sys:String>FOX</sys:String>
<sys:String>SKY</sys:String>
</toolkit:ListPicker>
Now how can I access these items after they have been multi checked?
For one item I could have done:
if (TopStoriesListPicker.SelectedItem == CNN)
do something
But now I have multiple items, plus the fact that these are no more proper items but have been defined by sys:String
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…