UWP Hamburger navigation menu error when using visual triggers - XAML
<p>I'm creating a Hamburger navigation UI for an UWP using Visual triggers and I get this error.
"An animation is trying to modify an object named 'HamburgerButtonMobile', but no such object can be found in the Page."
This is my code</p>

<pre><code> &lt;VisualState.Setters&gt;
    &lt;Setter Target="HamburgerButtonMobile.Visibility" Value="Collapsed" /&gt;
&lt;/VisualState.Setters&gt;
&lt;Pivot x:Name="MoviesPivot" Title="MOVIES"&gt;
    &lt;Pivot.TitleTemplate&gt;
        &lt;DataTemplate&gt;
            &lt;RelativePanel&gt;
                    &lt;TextBlock Text="{Binding}" FontSize="72" Foreground="#FF21B255" FontWeight="Light" RelativePanel.AlignRightWithPanel="True" x:Name="titleName"/&gt;
                    &lt;Button x:Name="HamburgerButtonMobile" FontFamily="Segoe MDL2 Assets" Content="&amp;#xE700;" Width="50" Height="50" Background="Transparent" Click="HamburgerButtonMobile_Click" RelativePanel.LeftOf="titleName" RelativePanel.AlignVerticalCenterWithPanel="True" /&gt;
            &lt;/RelativePanel&gt;
        &lt;/DataTemplate&gt;
&lt;/Pivot.TitleTemplate&gt;
</code></pre>