title: Calling an event in code c#
body: <p>Is it possible to call an event such as the one shown below in code.</p>
  
  <pre><code>private void Item_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
  {
  
  }
  </code></pre>
  
  <p>The object I want to call it on is ListView.Items[listView.Items.Count-1]</p>
  
  <p>XAML</p>
  
  <pre><code>&lt;ListView.ItemContainerStyle&gt;
      &lt;Style TargetType="ListViewItem"&gt;
          &lt;EventSetter Event="PreviewMouseLeftButtonDown" 
              Handler="ListViewItem_PreviewMouseLeftButtonDown" /&gt;
      &lt;/Style&gt;
  &lt;/ListView.ItemContainerStyle&gt;
  </code></pre>
  
  <p>So my attempt to call it looks like this, but it doesnt work.</p>
  
  <pre><code>Item_PreviewMouseLeftButtonDown(listView.Items[slideListView.Items.Count-1], null);
  </code></pre>