Access ListViewItem properties within DataTemplate
<p>If I have a DataTemplate in my ListView, how do I access the ListViewItem properties? Since ListViewItem elements are created at runtime, how does one create new properies within the DataTemplate?</p>

<pre><code>&lt;ListView&gt;
    &lt;ListView.ItemTemplate&gt;
        &lt;DataTemplate&gt;
        //Here you would place a Grid or some other UI element. It will be implicitly placed within an ListView Item at runtime, I think
        &lt;/DataTemplate&gt;
    &lt;/ListView.ItemTemplate&gt;
&lt;/ListView&gt;
</code></pre>

<p>I want to add some properties to each ListViewItem which will be generated at runtime. How is that possible?</p>