title: How to Add EventTrigger with SoundActions in code behind?
body: <p>So I'm trying to create controls on the fly (RegularPolygon to be exact) and I want to add 2 PlaySoundActions to the controls as an EventTrigger based off of the Tap Event.  Currently I have the following code:</p>
  
  <pre><code>EventTrigger trigger = new EventTrigger();
  PlaySoundAction correct = new PlaySoundAction();
  PlaySoundAction incorrect = new PlaySoundAction();
  correct.Source = new Uri("/Sounds/Correct.mp3");
  correct.Volume = 0.5;
  incorrect.Source = new Uri("/Sounds/Incorrect.mp3");
  incorrect.Volume = 0.5;
  
  trigger.Actions.Add(correct);   // this line doesn't work
  trigger.Actions.Add(incorrect); // this also doesn't work
  shape.Triggers.Add(trigger);
  </code></pre>
  
  <p>Each line has an error like</p>
  
  <blockquote>
    <p>Error 2   Argument 1: cannot convert from
    'Microsoft.Expression.Interactivity.Media.PlaySoundAction' to
    'System.Windows.TriggerAction'</p>
  </blockquote>
  
  <p>I'm not entirely sure what to cast the PlaySoundAction object as.  I don't want to do this in XAML because I'm creating these controls on the fly.</p>
  
  <p>I also tried creating a Style for RegularPolygon to have the EventTrigger with the PlaySoundAction(s), but setting the style of the control programmatically does not add this logic to the control.</p>
  
  <pre><code>&lt;Application.Resources&gt;
          &lt;ResourceDictionary&gt;
              &lt;Style TargetType="es:RegularPolygon" x:Key="Default"&gt;
                  &lt;i:Interaction.Triggers&gt;
                      &lt;i:EventTrigger EventName="Tap"&gt;
                          &lt;eim:PlaySoundAction Source="/Sounds/Incorrect.mp3" Volume="0.5" /&gt;
                          &lt;eim:PlaySoundAction Source="/Sounds/Correct.mp3" Volume="0.5" /&gt;
                      &lt;/i:EventTrigger&gt;
                  &lt;/i:Interaction.Triggers&gt;
              &lt;/Style&gt;
          &lt;/ResourceDictionary&gt;
  &lt;/Application.Resources&gt;
  </code></pre>
  
  <p><strong>Is there a way to add an EventTrigger/PlaySoundAction in code behind or create a style that a control can inherit from that has an EventTrigger/PlaySoundAction?</strong></p>