I have a custom Toobar component in my app.
<!-- TOOLBAR START-->
<StackPanel Dock="Top" ux:Class="Toolbar">
<Router ux:Dependency="router"/>
<JavaScript File="../Backend.js" />
<string ux:Property="Title" />
<float4 ux:Property="Color" />
<Panel Height="56" Color="{Property this.Color}" Padding="16, 0">
<Button Clicked="{goBack}">
<Icon FontSize="20" Margin="0,16"></Icon>
</Button>
<Text Value="{Property this.Title}" Alignment="CenterLeft" Font="medium" FontSize="15" Margin="56,0" TextColor="#fff" />
<StackPanel Orientation="Horizontal" Alignment="Right" >
<Icon FontSize="20" Margin="0,16"></Icon>
</StackPanel>
</Panel>
<!-- Flat or Raised?-->
<DropShadow />
</StackPanel>
<!-- TOOLBAR END -->
The button calls a function in my main JS file that tells the router to go back. I reference the app’s router to the Toolbar component as a ux:Dependency. The toolbar is included in pretty much every page in the app.
My problem is basically that it doesn’t go back when pressed, what am I doing wrong?