title: ListView: getting an actual item object from ListViewItem
body: <p>I'm adding items of my own class to <code>ListView</code> (the listview has bindings set up appropriately):</p>
  
  <pre><code>_listView.Items.Add(new ProblemsListItem());
  </code></pre>
  
  <p>I have a <code>MouseDoubleClick</code> handler which acquires a <code>ListViewItem</code> that was clicked:</p>
  
  <pre><code>void onProblemDoubleClick(object sender, MouseButtonEventArgs e)
  {
      ListViewItem item = FindVisualParent&lt;ListViewItem, ListView&gt;(e.OriginalSource as DependencyObject);
  }
  
  public static TParent FindVisualParent&lt;TParent, TLimit&gt;(DependencyObject obj) where TParent : DependencyObject
  {
      while (obj != null &amp;&amp; !(obj is TParent))
      {
          if (obj is TLimit)
              return null;
          obj = VisualTreeHelper.GetParent(obj);
      }
      return obj as TParent;
  }
  </code></pre>
  
  <p>My qestion is: how can I convert this <code>ListViewItem</code> to my <code>ProblemsListItem</code> object, or get this object from the item?</p>
  
  <p>I've tried inheriting <code>ProblemsListItem</code> from <code>ListViewItem</code>. Then I can, of course, convert <code>item</code> to <code>ProblemsListItem</code> type in the handler, but this totally breaks ListView: all columns are empty, it's not being filled properly.</p>