title: WPF playing MediaElement pause does not stop video
body: <p>programming C# WPF media player application.<br>
  I have placed a canvas, on that canvas i placed a mediaelement and button, when clicking the button i want to video to pause, so i made the following function:  </p>
  
  <pre><code>private void button1_Click(object sender, RoutedEventArgs e)
  { mediaElement1.Pause(); }
  </code></pre>
  
  <p>When I debug, it enters the function but does not pause the video.  </p>
  
  <p>Why is that ?</p>
  
  <p>Thanks  </p>
  
  <p>MediaElement:</p>
  
  <pre><code>&lt;MediaElement Canvas.Left="72" Canvas.Top="33" Height="168" Name="mediaElement1"    Width="271" Source="C:\Users\ilans\Documents\Visual Studio 2010\Projects\SampleWPFVideoApp\SampleWPFVideoApp\SampleWPFVideoApp\Wildlife.wmv" UnloadedBehavior="Manual"&gt;
              &lt;/MediaElement&gt;
  </code></pre>
  
  <p>Button:</p>
  
  <pre><code>&lt;Button HorizontalAlignment="Center" VerticalAlignment="Center" Height="45" Width="45" Canvas.Left="70" Canvas.Top="150" Panel.ZIndex="1" Click="button1_Click"&gt;
              &lt;Button.Template&gt;
                  &lt;ControlTemplate TargetType="Button"&gt;
                      &lt;StackPanel&gt;
                          &lt;ContentPresenter Content="{TemplateBinding Content}" /&gt;
                      &lt;/StackPanel&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/Button.Template&gt;
              &lt;Image Source="Images\play.png"/&gt;
          &lt;/Button&gt;
  </code></pre>