I have multiple pages and a button, which I want to change the handler depending on which page is active:
<PageControl>
<Page>
<WhileActive>
<Set Target="click.Handler" Value="{someFunction1} />
</WhileActive>
</Page>
<Page>
<WhileActive>
<Set Target="click.Handler" Value="{someFunction2} />
</WhileActive>
</Page>
<Page>
<WhileActive>
<Set Target="click.Handler" Value="{someFunction3} />
</WhileActive>
</Page>
</PageControl>
<Button>
<Clicked ux:Name="click" Handler="{someFunction1}" />
</Button>
I know I can set one handler on the buttton, and have an observable check which page is active and then trigger different functions depending on which page is active as so, but I prefer to do it the way above is this possible and what am I doing wrong?