 /&gt;
        
&lt;/draw:SkiaLayout&gt;
</code></pre>
<p>In code-behind:</p>
<pre><code class="lang-csharp">private void OnRunButtonTapped(object sender, EventArgs e)
{
    if (PlayerAnimation.IsPlaying)
    {
        PlayerAnimation.Stop();
    }
    else
    {
        PlayerAnimation.Start();
    }
}
</code></pre>
<h3 id="animation-states">Animation States</h3>
<p>Use the <code>DefaultFrame</code> property to control which frame is shown when the animation is not playing:</p>
<pre><code class="lang-xml">