title: Change Property from within event trigger
body: <p>What I want is simply that all my TextBoxes as by default set their cursor at the end of the text so I want in pseudocode:</p>
  
  <pre><code>if (TextChanged) textbox.SelectionStart = textbox.Text.Length;
  </code></pre>
  
  <p>Because I want that all textboxes in my application are affected I want to use a style for that. This one won't work (for obvious reasons) but you get the idea:</p>
  
  <pre><code>&lt;Style TargetType="{x:Type TextBox}"&gt;
    &lt;Style.Triggers&gt;
      &lt;EventTrigger RoutedEvent="TextChanged"&gt;
        &lt;EventTrigger.Actions&gt;
          &lt;Setter Property="SelectionStart" Value="{Binding Text.Length}"/&gt;
        &lt;/EventTrigger.Actions&gt;
      &lt;/EventTrigger&gt;
    &lt;/Style.Triggers&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>EDIT:
  One important thing is that the SelectionStart property should only be set if the Text property was assigned programmatically, not when the user edits the textbox.</p>