title: How can I bind an Event to changing the property on another element in the tree in XAML WPF?
body: <p>I'll start off with the code as it should be fairly self-explanatory:</p>
  
  <pre><code>&lt;commonControls:SearchTextBox
                      x:Name="searchTextBox"
                      Margin="6,0"
                      HorizontalAlignment="Right"
                      MinWidth="50"
                      Width="130"
                      SearchMode="Instant"
                  &gt;
                      &lt;i:Interaction.Triggers&gt;
                          &lt;i:EventTrigger EventName="Search"&gt;
                              &lt;cmd:EventToCommand Command="{Binding Search}"
                                      CommandParameter="{Binding ElementName=searchTextBox, Path=Text}" /&gt;
                          &lt;/i:EventTrigger&gt;
                          &lt;i:EventTrigger EventName="Cancel"&gt;
                              &lt;!-- Code to set searchTextBox.Text to Empty --&gt;
                          &lt;/i:EventTrigger&gt;
                      &lt;/i:Interaction.Triggers&gt;
                  &lt;/commonControls:SearchTextBox&gt;
  </code></pre>
  
  <p>The <code>SearchTextBox</code> has an Event called <code>Cancel</code> which executes if the user clicks the X button on the right hand side of the TextBox. What I would like to do is hook onto that event, and clear the Text property of the TextBox. I'm looking for a way to do this purely in XAML, with no Code Behind, and without hitting the ViewModel.</p>