title: How to disable selection some item in a listview windows phone
body: <p>I want to <strong>disable selection</strong> of some items in <strong>listBoxEmployee</strong> whole <strong>isEnable</strong> property = false but all of them still selectable and I dont know why. In my mainpage, my code is:</p>
  
  <pre><code>public SelectLevel()
          {
              InitializeComponent();
  
              passedLevel = (int)IsolatedStorageSettings.ApplicationSettings["passedLevel"];
  
              List&lt;LevelList&gt; myData = new List&lt;LevelList&gt;();
  
              for (int i = 0; i &lt;= passedLevel; i++)
              {
                  myData.Add(new LevelList { levelNumber = i, urlImg = "Images/passed.png", IsEnabled = true});
              }
  
              for (int j = passedLevel + 1; j &lt;= allLevel; j++)
              {
                  myData.Add(new LevelList { levelNumber = j, urlImg = "Images/notpassed.png", IsEnabled = false });
  
              }
  
              listBoxEmployee.ItemsSource = myData;
  
          }
  </code></pre>
  
  <p>And my xaml page:</p>
  
  <pre><code>&lt;ListBox.ItemTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;StackPanel Orientation="Vertical"&gt;
                              &lt;Grid Width="80" Height="80" IsHitTestVisible="{Binding IsEnabled}"&gt;
                                  &lt;Image Source="{Binding urlImg}" IsHitTestVisible="{Binding IsEnabled}"&gt;&lt;/Image&gt;
                                  &lt;TextBlock Text="{Binding IsEnabled}" IsHitTestVisible="{Binding IsEnabled}" HorizontalAlignment="Center" FontWeight="Bold" VerticalAlignment="Center" TextWrapping="Wrap" FontSize="36" Foreground="Black" /&gt;
  
                              &lt;/Grid&gt;
                          &lt;/StackPanel&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/ListBox.ItemTemplate&gt;
  </code></pre>