<Window x:Class="SoundAndVideo.MultipleSounds"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MultipleSounds" Height="300" Width="300"
    >
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition></RowDefinition>
        <RowDefinition></RowDefinition>
      </Grid.RowDefinitions>
      <MediaElement x:Name="media1" Volume="0.25"></MediaElement>
      <MediaElement x:Name="media2" Volume="1"></MediaElement>


      <Button>
        <Button.Content>Click me to hear X.</Button.Content>
        <Button.Triggers>
          <EventTrigger RoutedEvent="Button.Click">
            <EventTrigger.Actions>
            <BeginStoryboard>
              <Storyboard>
                <MediaTimeline Source="test.mp3" Storyboard.TargetName="media1"></MediaTimeline>
              </Storyboard>
            </BeginStoryboard>
            </EventTrigger.Actions>
          </EventTrigger>
        </Button.Triggers>
      </Button>

      <Button Grid.Row="1">
        <Button.Content >Click me to hear X.</Button.Content>
        <Button.Triggers>
          <EventTrigger RoutedEvent="Button.Click">
            <EventTrigger.Actions>
              <BeginStoryboard>
                <Storyboard>
                  <MediaTimeline Source="test.wav" Storyboard.TargetName="media2"></MediaTimeline>
                </Storyboard>
              </BeginStoryboard>
            </EventTrigger.Actions>
          </EventTrigger>
        </Button.Triggers>
      </Button>
    </Grid>
</Window>
