0
votes

Is it possible to manipulate the ListPicker of the WPToolkit on Windows Phone 8, so that I can deactivate some elements? I have a list of elements and some elements shouldn't be selected by the user, but these items neeed to show up on the ListPicker, so I can't remove them from the collection. I've tried setting up IsHitTestVisible to true in the DataTemplate of the FullMode, but this doesn't work.

So is there a way to show elements withing the ListPicker, but prevent the ListPicker from selecting these elements?

1
if you want to deactivate particular list item then you need to set IsHitTestVisible to false for particular list item not for DataTemplate - Pradeep Kesharwani

1 Answers

0
votes

There is no specific workaround to this. as datatemplate is just a looping of similar attributed elements.

But using the event Selectionchanged and therein comparing te selected index could solve your problem to some extent.

I havent seen your code so could only write a raw code at this point of time.

private void list_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
    if (list.SelectedIndex==1)
      {
      //actions
      }
      else
      {
      //actions
      }
}