title: listbox does not contain a definition for 'Selected'
body: <p>I have this code in C# wpf page</p>
  <pre><code>listBox1.Items[i].Selected = !listBox1.Items[i].Selected;
  </code></pre>
  <p>and it produce this error:</p>
  <blockquote>
  <p>Error CS1061  'object' does not contain a definition for 'Selected' and no extension method 'Selected' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)   Active</p>
  </blockquote>
  <p>also I've been tested   listBox1.SetSelected(i, true); still the same error</p>