title: Can i call a function via DataTrigger (XAML)?
body: <p>I have a function in .xaml.cs which i wanted to call:</p>
  
  <p>.xaml.cs</p>
  
  <pre><code>private void treeView_SelectedItemChanged(object sender, EventArgs e)
  {
          //treeView.ScrollToCenterOfView(sender as TreeViewItem);
  }
  </code></pre>
  
  <p>like from this post: 
  <a href="https://stackoverflow.com/questions/2946954/make-listview-scrollintoview-scroll-the-item-into-the-center-of-the-listview-c">Make ListView.ScrollIntoView Scroll the Item into the Center of the ListView (C#)</a>
  Answer 1</p>
  
  <p>But i dont use the SelectedItem, my approach would be like:</p>
  
  <p>XAML:</p>
  
  <pre><code>&lt;Style.Triggers&gt;
       &lt;DataTrigger Binding="{Binding Path=IsActive}" Value="true"&gt;
            // ###call this function
       &lt;/DataTrigger&gt;
  &lt;/Style.Triggers&gt;
  </code></pre>
  
  <p>I dont have any Idea how to raise this function by change of the DataModel.
  In every Tutorial i have gooled they do it via Event/Command.</p>
  
  <p>Thx</p>